Summary
In OpenClaw 2026.5.6, native sessions_spawn(runtime="subagent") did not honor an explicit cwd when delegating to another agent. This blocked same-workspace delegated execution / handoff absorption flows where a TL/session needs a worker agent to operate in the requester workspace rather than the worker default workspace.
Related older reports appear to be closed, but this reproduced on a current 2026.5.6 runtime in a cross-agent same-workspace canary.
Related: #42712, #43900, #40825
Reproduction
From an agent/session whose workspace is different from the target worker agent default workspace, spawn a native subagent with an explicit cwd:
sessions_spawn({
runtime: "subagent",
agentId: "code-specialist",
cwd: "/Users/.../.openclaw/workspace-daily-devops",
sandbox: "inherit",
task: "print pwd, then write/read tmp/handoff-canary/same-workspace-runtime-fix.txt"
})
Expected behavior
The child subagent process/session should run with pwd exactly equal to the explicit cwd:
/Users/.../.openclaw/workspace-daily-devops
Relative tool paths should resolve inside that cwd, so same-workspace handoff absorption can be done without cross-workspace writes.
Actual behavior
Before the local fix, the native subagent did not honor the explicit cwd for this delegated execution path. The worker landed outside the requested requester workspace, which blocked the canary and prevented a safe same-workspace handoff absorption workflow.
Impact
This breaks an important multi-agent/TL workflow:
- TL/requester needs to delegate implementation to a worker agent.
- The worker must write only inside the requester workspace.
- Cross-workspace writes are disallowed for safety.
- If
cwd is ignored, there is no safe path for the worker to perform same-workspace edits.
Local fix direction
A local owned-package fix made the native subagent path pass/honor the spawned workspace cwd internally, and a canary passed afterward.
Passing canary after local fix:
same_workspace_runtime_fix_canary=PASS
observed_pwd=/Users/.../.openclaw/workspace-daily-devops
file=tmp/handoff-canary/same-workspace-runtime-fix.txt
Local validation included unit tests around subagent spawn workspace/cwd behavior.
Environment
- OpenClaw:
2026.5.6
- Node:
v22.22.0
- OS: macOS / Darwin arm64
- Channel: Telegram group session + native subagent runtime
Summary
In OpenClaw
2026.5.6, nativesessions_spawn(runtime="subagent")did not honor an explicitcwdwhen delegating to another agent. This blocked same-workspace delegated execution / handoff absorption flows where a TL/session needs a worker agent to operate in the requester workspace rather than the worker default workspace.Related older reports appear to be closed, but this reproduced on a current 2026.5.6 runtime in a cross-agent same-workspace canary.
Related: #42712, #43900, #40825
Reproduction
From an agent/session whose workspace is different from the target worker agent default workspace, spawn a native subagent with an explicit cwd:
Expected behavior
The child subagent process/session should run with pwd exactly equal to the explicit
cwd:Relative tool paths should resolve inside that cwd, so same-workspace handoff absorption can be done without cross-workspace writes.
Actual behavior
Before the local fix, the native subagent did not honor the explicit cwd for this delegated execution path. The worker landed outside the requested requester workspace, which blocked the canary and prevented a safe same-workspace handoff absorption workflow.
Impact
This breaks an important multi-agent/TL workflow:
cwdis ignored, there is no safe path for the worker to perform same-workspace edits.Local fix direction
A local owned-package fix made the native subagent path pass/honor the spawned workspace cwd internally, and a canary passed afterward.
Passing canary after local fix:
Local validation included unit tests around subagent spawn workspace/cwd behavior.
Environment
2026.5.6v22.22.0