singularity-forge/packages
Tom Boucher 75e82a4236 fix(session): rebuild tools when cwd changes in newSession (#633) (#638)
Tools (write, read, edit, bash) capture cwd at creation time via
createWriteTool(cwd), createReadTool(cwd), etc. When auto-mode
enters a worktree, process.cwd() changes but tools were not
recreated — they continued resolving relative paths against the
original project root.

This caused artifacts to be written to the main project's .gsd/
directory instead of the worktree's .gsd/ directory. The dispatcher
then couldn't find the artifact at the expected worktree path and
retried the unit indefinitely.

Fix: detect cwd change in newSession() and call _buildRuntime()
to recreate tools with the updated cwd. This is a targeted rebuild
that only fires when cwd actually changed (typically once per
auto-mode session when entering/exiting a worktree).

Fixes #633
2026-03-16 09:23:19 -06:00
..
native perf: optimize discovery and interactive hot paths 2026-03-14 16:03:44 -05:00
pi-agent-core fix(agent-core): await event queue in tool hooks for safe parallel execution (#439) 2026-03-14 21:16:17 -06:00
pi-ai feat: update ollama cloud provider models (#578) 2026-03-15 22:22:29 -06:00
pi-coding-agent fix(session): rebuild tools when cwd changes in newSession (#633) (#638) 2026-03-16 09:23:19 -06:00
pi-tui fix: arrow key cursor not updating + Shift+Enter not inserting newlines (#485) 2026-03-15 19:47:49 -06:00