Fix provider diagnostics and ownership docs

This commit is contained in:
pku-xht
2026-08-05 06:12:42 +08:00
parent e2b73d278c
commit 13d7318dac
8 changed files with 40 additions and 13 deletions
@@ -55,11 +55,17 @@ class CodexProvider implements SubagentProvider {
) {}
start(request: ResolvedSubagentStartRequest) {
const parentCwd = request.parent.session.header.cwd
if (parentCwd === undefined) {
throw new Error(
'subagent-codex: no working directory for the child — delegate from a parent session that has one',
)
}
const spec: CodexRunSpec = {
cwd: resolveChildCwd(
'subagent-codex',
undefined,
request.parent.session.header.cwd,
parentCwd,
),
env: this.config.env,
disposeGraceMs: this.config.disposeGraceMs,