Repository navigation
Description
Operating system
macOS
Orca version
latest
Details
Short summary:
Agent chat/log panel shows content from a different worktree (cross-worktree state leak)
What happened?
I have multiple worktrees open simultaneously in different tabs/panels
(A, B, C). While actively viewing worktree C, the agent chat/log panel
suddenly displayed content from worktree A instead of C.
This suggests the chat/log panel state is not correctly scoped per
worktree — it appears the UI can render content from the wrong
worktree's session, likely due to a shared state reference or a stale
subscription/websocket update not being filtered by the currently
active worktree.
This is concerning because it could easily be mistaken for actual
agent activity in worktree C, when in reality it's leftover/leaked
output from worktree A.
How can we reproduce it?
- Open worktree A in one tab/panel and start an agent session (let it
produce some chat/log output) - Open worktree B and C in separate tabs/panels
- Switch focus to worktree C
- At some point (not always immediately — seems to happen
intermittently), the chat/log panel for C displays messages/output
that actually belong to worktree A
Note: I don't yet have a 100% reliable reproduction — it seems to
happen when multiple worktrees are open at the same time and agent
activity is ongoing in more than one of them. Will update if I find a
more deterministic trigger.
Anything else that might help:
- This only seems to happen when 2+ worktrees are open in parallel
tabs/panels — haven't seen it with a single worktree open - Might be related to how worktree sessions are keyed/identified
internally (e.g. if sessions share an ID, path, or websocket channel
instead of being fully isolated per worktree) - Worth checking: does refreshing/reopening the tab for C fix it
temporarily, or does the wrong content persist? - Would be good to confirm whether this is purely a UI rendering issue
(correct data, wrong panel) or whether the underlying agent session
itself is actually cross-talking between worktrees (more serious,
could mean commands/context bleed between worktrees)
Activity
nwparker commentedon Jul 4, 2026
thx for the report!
nwparker commentedon Jul 4, 2026
LMK if the PR doesn't sound like it'd fix it though