What happened?
When PawWork runs inside a Git linked worktree (a worktree created by git worktree add), running git checkout <branch> inside the session does not emit a vcs.branch.updated SSE event. The right-panel Status branch row and any other consumer of that event keep showing the previous branch until the page is reloaded.
Which area seems affected?
Model harness, prompts, tools, or session mechanics
How much does this affect you?
Makes a workflow harder, but there is a workaround
Steps to reproduce
- Open PawWork inside a Git linked worktree (any path created via
git worktree add)
- Create a new session and have the agent run
git checkout <other-branch>
- Watch the right-panel Status section's branch row — it still shows the previous branch
- Open DevTools and confirm no
vcs.branch.updated event is logged
What did you expect to happen?
The branch row updates to the new branch within a second or two, the same way it does in a regular non-linked repository, because the file watcher should observe the HEAD change.
PawWork version
v2026.5.29 (also reproduces on the claude/status-panel-redesign dev branch as of 2026-05-31)
OS version
macOS (Darwin 25.5.0)
Can you reproduce it again?
Yes, every time
Diagnostics
Root cause: FileWatcher (packages/opencode/src/file/watcher.ts) derives the watch path from ctx.project.worktree, but in a linked worktree the live HEAD lives at <gitcommondir>/worktrees/<name>/HEAD, not the main repository's .git/HEAD. The Vcs service's FileWatcher subscription therefore never sees the HEAD change, so vcs.branch.updated is not published.
Suggested fix: in packages/opencode/src/file/watcher.ts, resolve the actual per-worktree git metadata directory via git rev-parse --git-dir (or git rev-parse --git-path HEAD) instead of assuming <worktree>/.git/HEAD.
Reported during PR #1013 debugging.
What happened?
When PawWork runs inside a Git linked worktree (a worktree created by
git worktree add), runninggit checkout <branch>inside the session does not emit avcs.branch.updatedSSE event. The right-panel Status branch row and any other consumer of that event keep showing the previous branch until the page is reloaded.Which area seems affected?
Model harness, prompts, tools, or session mechanics
How much does this affect you?
Makes a workflow harder, but there is a workaround
Steps to reproduce
git worktree add)git checkout <other-branch>vcs.branch.updatedevent is loggedWhat did you expect to happen?
The branch row updates to the new branch within a second or two, the same way it does in a regular non-linked repository, because the file watcher should observe the HEAD change.
PawWork version
v2026.5.29 (also reproduces on the
claude/status-panel-redesigndev branch as of 2026-05-31)OS version
macOS (Darwin 25.5.0)
Can you reproduce it again?
Yes, every time
Diagnostics
Root cause:
FileWatcher(packages/opencode/src/file/watcher.ts) derives the watch path fromctx.project.worktree, but in a linked worktree the live HEAD lives at<gitcommondir>/worktrees/<name>/HEAD, not the main repository's.git/HEAD. TheVcsservice's FileWatcher subscription therefore never sees the HEAD change, sovcs.branch.updatedis not published.Suggested fix: in
packages/opencode/src/file/watcher.ts, resolve the actual per-worktree git metadata directory viagit rev-parse --git-dir(orgit rev-parse --git-path HEAD) instead of assuming<worktree>/.git/HEAD.Reported during PR #1013 debugging.