deepseek-ai/deepseek-harness · error · Error

terminal tools require an initiating agent

Error message

terminal tools require an initiating agent

What it means

Error "terminal tools require an initiating agent" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/terminal/tool-terminal/src/index.ts:118

} as const

const SESSION_SNAPSHOT_SCHEMA = {
  type: 'object',
  additionalProperties: false,
  properties: SESSION_SNAPSHOT_PROPERTIES,
} as const

const BACKGROUND_TASK_OUTPUT_SCHEMA = {
  type: 'object',
  additionalProperties: false,
  properties: {
    kind: { type: 'string', required: true, const: 'background' },
    jobId: { type: 'string', required: true },
  },
} as const

function requireAgent(agent: Agent | undefined): Agent {
  if (agent === undefined) throw new Error('terminal tools require an initiating agent')
  return agent
}

function sessionId(args: SessionArgs): TerminalSessionIdType {
  if (args.sessionId.length === 0) {
    throw new Error('sessionId must be a non-empty string')
  }
  return TerminalSessionId(args.sessionId)
}

function textResult(text: string, maxBytes: number): ContentBlock[] {
  return [{ type: 'text', text: boundTerminalText(text, maxBytes) }]
}

function rawContentText(content: readonly ContentBlock[]): string | undefined {
  if (content.length !== 1) return undefined
  const block = content[0]
  return block?.type === 'text' ? block.text : undefined

View on GitHub (pinned to b150a551b8)

Solutions

  1. Invoke terminal tools within an agent session so an initiating agent exists.

When it happens

Trigger: Thrown at packages/terminal/tool-terminal/src/index.ts:118 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/f3f65f5cf3602aae. Report an issue: GitHub.