Critical Bug
Developer-pipeline agent launches in the main project directory instead of its assigned worktree directory, requiring manual navigation via pwd and cd.
Evidence
From the taskctl pipeline run on issue #272:
Developer reported:
# Verify working directory matches expected path
$ pwd
/Users/janni/projects/opencode // ← WRONG - this is main project!
Expected: /Users/janni/projects/opencode/.worktrees/add-error-history-field-to-pipeline-state-types-and-write-tests
The developer had to manually detect the mismatch and navigate to the correct directory.
Root Cause
Despite fix #379 (session.directory in messages), the developer session initialization still sets the working directory to the main project instead of the worktree.
Likely locations:
packages/opencode/src/tasks/pulse-scheduler.ts - spawnDeveloper() session creation
packages/opencode/src/session/prompt.ts - session.directory usage for initial working directory
- Developer context setup in pipeline agent spawning
Impact
- Developer wastes tokens on manual directory detection and navigation
- Risk of operating in wrong directory if developer skips validation
- Breaks the autonomous pipeline flow
Quality Gates
Acceptance Criteria
- Developer session launches directly in worktree directory
- No manual
pwd/cd navigation needed
- Developer sees:
pwd → /path/.worktrees/task-name immediately
Critical Bug
Developer-pipeline agent launches in the main project directory instead of its assigned worktree directory, requiring manual navigation via
pwdandcd.Evidence
From the taskctl pipeline run on issue #272:
Developer reported:
The developer had to manually detect the mismatch and navigate to the correct directory.
Root Cause
Despite fix #379 (session.directory in messages), the developer session initialization still sets the working directory to the main project instead of the worktree.
Likely locations:
packages/opencode/src/tasks/pulse-scheduler.ts-spawnDeveloper()session creationpackages/opencode/src/session/prompt.ts- session.directory usage for initial working directoryImpact
Quality Gates
pwdin developer session returns worktree path, not main projectAcceptance Criteria
pwd/cdnavigation neededpwd→/path/.worktrees/task-nameimmediately