You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session Chat header changes from branch to worktree after opening #783
bugSomething isn't workingin-progressImplementation started, work still incompletepriority: mediumNon-blocking V1 work and polishsharedShared or cross-platform implementation
Opening a session that runs in a worktree shows its checkout identity at once, without the header changing a moment later.
Observed (reported after #780 merged): opening a session from a worktree first shows the branch in the Session Chat top bar and its repo strip pill, then a moment later it switches to the worktree name. It happens on every open of a worktree session.
Expected: the header shows the final worktree identity from the first frame, using what Home already knows (the session's directory, its project and worktree inventory, and the branch), or shows a stable placeholder that doesn't change shape.
Acceptance:
Opening a worktree session from Home shows the worktree identity immediately, on iOS and Android, on v1 and v2.
Opening a main-checkout session doesn't flicker either.
A unit test covers the initial header state of a worktree session.
Session Chat's top bar opened with the folder name and the project letter, and switched to the worktree icon only after its own chain of requests had finished (added paths, then each path's current project, then the worktree list; on v2, list, refresh and list again). It ignored what Home had already loaded. The label text never changed, only its badge. The repo-strip branch pill was stable.
Both platforms now share a small WorktreeInventoryCache. Home writes its added paths and worktree inventories to it. Session Chat reads it synchronously when it opens, so the first frame is already final. The server fetch still runs, but only republishes if its answer differs, and a failed refresh keeps the cached identity. The one remaining case that can change after opening is a cold open before Home ever loaded, for example from a deep link. A test covers it.
Real-app evidence
Both apps were run against the scenario harness: real opencode v1 1.19.1 and v2 dev, worktree acme-invoices-tax on feature/tax-rounding. Each image is a strip of consecutive frames from a screen recording of tapping the session on Home.
Before
After
iOS v2
iOS v1
Android v2
Android v1
Before the fix the letter showed for about one frame on iOS and about 1 s on Android, then changed to the worktree icon. After the fix the worktree icon is there from the first frame on all four. A main-checkout session (checked on v2, both platforms) keeps its letter with no change:
bugSomething isn't workingin-progressImplementation started, work still incompletepriority: mediumNon-blocking V1 work and polishsharedShared or cross-platform implementation
Activity
ivanfenenko commentedon Oct 21, 2026
Root cause and fix
Session Chat's top bar opened with the folder name and the project letter, and switched to the worktree icon only after its own chain of requests had finished (added paths, then each path's current project, then the worktree list; on v2, list, refresh and list again). It ignored what Home had already loaded. The label text never changed, only its badge. The repo-strip branch pill was stable.
Both platforms now share a small
WorktreeInventoryCache. Home writes its added paths and worktree inventories to it. Session Chat reads it synchronously when it opens, so the first frame is already final. The server fetch still runs, but only republishes if its answer differs, and a failed refresh keeps the cached identity. The one remaining case that can change after opening is a cold open before Home ever loaded, for example from a deep link. A test covers it.Real-app evidence
Both apps were run against the scenario harness: real opencode v1 1.19.1 and v2 dev, worktree
acme-invoices-taxonfeature/tax-rounding. Each image is a strip of consecutive frames from a screen recording of tapping the session on Home.Before the fix the letter showed for about one frame on iOS and about 1 s on Android, then changed to the worktree icon. After the fix the worktree icon is there from the first frame on all four. A main-checkout session (checked on v2, both platforms) keeps its letter with no change:

Checks
./gradlew :app:testDebugUnitTest :app:assembleDebugpassed, 2479 tests (1 skipped).ProjectionReconciliationTests, which passed 8/8 when re-run alone.#783 Show the worktree checkout on the first Session Chat frame (#784)