deepseek-ai/deepseek-harness · error
workspace-attach-failed
workspace-attach-failed
Error message
session "${sessionId}" was created but could not attach to workspace "${workspace.id}": ${String(error)} What it means
Error "session "${sessionId}" was created but could not attach to workspace "${workspace.id}": ${String(error)}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/host/apiproxy/src/api-proxy.ts:2134
requestedCwd: error.requestedCwd,
...error.existingCwd === undefined ? {} : { existingCwd: error.existingCwd },
},
})
}
if (error instanceof SubagentSessionOwnership) {
return err(request, subagentOwnershipError(error.sessionId))
}
return err(request, {
code: 'internal',
message: `failed to create session "${sessionId}": ${String(error)}`,
details: {},
})
}
if (workspace !== undefined) {
try {
await workspace.attachSession(sessionId)
} catch (error: unknown) {
return err(request, {
code: 'workspace-attach-failed',
message: `session "${sessionId}" was created but could not attach to workspace "${workspace.id}": ${String(error)}`,
details: { sessionId, workspaceId: workspace.id },
})
}
}
// Echo the composition the session RUNS so a client can label it
// without waiting for the next list refresh — the create is the commit
// point that knows it (a caller that named none gets the default).
// Resolved from the log for the same reason `sessionListFields()` is:
// this handler also adopts an already-live session, and one that
// switched while blank runs a preset its header no longer names, so
// echoing the header would contradict both the adoption this call just
// allowed and the row `session.list` serves for the same session.
const created = ctx.agents.get(sessionId)
const createdPreset = created === undefined ? undefined : resolveSessionPreset(created.session)
return ok(request, { sessionId, ...createdPreset === undefined ? {} : { agentPreset: createdPreset } })
},View on GitHub (pinned to b150a551b8)
Solutions
- Fix the session/workspace attach failure named in the embedded error (cwd outside workspace, missing header), then attach or recreate the session.
When it happens
Trigger: Thrown at packages/host/apiproxy/src/api-proxy.ts:2134 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/28fef78b547ce264.
Report an issue: GitHub.