{"record":{"id":"efce7f7cee48117f","repo":"deepseek-ai/deepseek-harness","slug":"agent-busy-efce7f","errorCode":"agent-busy","errorMessage":"session \"${sessionId}\" is a subagent session; use subagent delivery","messagePattern":"session \"(.+?)\" is a subagent session; use subagent delivery","errorType":"exception","errorClass":"ApiRemoteSubagentSessionOwnership","httpStatus":null,"severity":"error","filePath":"packages/host/apiproxy/src/api-proxy.ts","lineNumber":1639,"sourceCode":"        // Another Host entry path may have published the same identity while\n        // this operation crossed an asynchronous persistence/filesystem step.\n        const live = ctx.agents.get(sessionId)\n        if (live !== undefined) {\n          if (hasSubagentOwner(live.session, live)) throw new SubagentSessionOwnership(sessionId)\n          return live\n        }\n        const attached = ctx.sessions.get(sessionId)\n        if (attached !== undefined && hasSubagentOwner(attached, undefined)) {\n          throw new SubagentSessionOwnership(sessionId)\n        }\n        throw error\n      }).finally(() => {\n        sessionCreations.delete(sessionId)\n      })\n      sessionCreations.set(sessionId, creation)\n    }\n    const agent = await creation\n    if (hasSubagentOwner(agent.session, agent)) throw new SubagentSessionOwnership(sessionId)\n    // Beside the cwd check for the same reason, and after the await so it\n    // covers every path that yields a live agent — freshly created, adopted\n    // live, resumed from disk, or recovered by the concurrent-creation catch.\n    assertPresetUnchanged(sessionId, presetId, resolveSessionPreset(agent.session))\n    if (agent.session.header.cwd !== cwd) {\n      throw new SessionCwdConflict(sessionId, cwd, agent.session.header.cwd)\n    }\n    return agent\n  }\n\n  /** Resolve or create one path while holding the Host's workspace-create chain. */\n  function ensureWorkspace(path: string): Promise<{ workspace: Workspace; created: boolean }> {\n    const operation = workspaceCreationChain.then(async () => {\n      const existing = await ctx.workspaceRegistry.resolveByPath(path)\n      if (existing !== undefined) return { workspace: existing, created: false }\n      return { workspace: await ctx.workspaceRegistry.create(path), created: true }\n    })\n    workspaceCreationChain = operation.then(() => undefined, () => undefined)","sourceCodeStart":1621,"sourceCodeEnd":1657,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/host/apiproxy/src/api-proxy.ts#L1621-L1657","documentation":"Error \"session \"${sessionId}\" is a subagent session; use subagent delivery\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/host/apiproxy/src/api-proxy.ts:1639 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}