Skip to content

[Bug]: Agent chat/log panel shows content from a different worktree #7326

Closed

Description

@Sharpek

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?

  1. Open worktree A in one tab/panel and start an agent session (let it
    produce some chat/log output)
  2. Open worktree B and C in separate tabs/panels
  3. Switch focus to worktree C
  4. 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

  1. added
    bug
    on Jul 4, 2026
  2. added
    os:macos
    on Jul 4, 2026
  3. self-assigned this
    on Jul 4, 2026
  4. nwparker commented on Jul 4, 2026

    @nwparker
    Contributor

    thx for the report!

  5. nwparker commented on Jul 4, 2026

    @nwparker
    Contributor

    LMK if the PR doesn't sound like it'd fix it though

  6. added theissue type on Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugos:macos

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions