Named subagents intermittently ignore the requested worktree
Environment
Codex Desktop on Windows with Git linked worktrees.
Expected behavior
A named subagent should begin inside the worktree and branch supplied in its task brief, or fail before analysis with a structured explanation that the target cannot be reached.
Actual behavior
Intermittently, a named subagent reports the parent workspace/branch or cannot resolve the supplied absolute worktree path. The sidecar can then inspect the wrong or an empty diff.
This is not reproduced on every launch. In the current session, the subagent reported the requested branch but its physical working directory was a sandbox-mounted path rather than the supplied host path. The issue therefore appears sensitive to sandbox path virtualization or startup timing.
Current workaround
The parent includes the expected pwd and branch in every brief, treats a mismatch as incomplete work, and supplies a committed diff packet when a sidecar cannot see the intended files.
Request
Please provide an explicit worktree/CWD binding for named subagents, validate it before analysis begins, and return a structured reason when the target is inaccessible. That would prevent silent audits of the wrong workspace.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗