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
bug(tui): shell footer count can become stale #35816
The V2 TUI footer can report more running shells than actually exist. This was observed on 0.0.0-next-15038, where a session showed 3 shells while only one command was still running.
Current behavior
The footer counts every entry returned by data.shell.list(currentLocation()) whose metadata.sessionID matches the current session. This includes all currently running shell-tool processes, whether the tool call is foreground or background. It does not count interactive session shell commands created without metadata.sessionID.
The client inventory is populated from /api/shell and updated by shell.created, shell.exited, and shell.deleted events. A shell-list response can race a lifecycle event and restore an already-exited shell to the client cache.
Open decisions
Should the footer represent all running shell-tool processes, only explicitly backgrounded shells, or another category?
Should foreground shell calls be shown separately from background jobs?
What ordering/reconciliation contract should inventory snapshots and lifecycle events provide?
PR #35814 contains one minimal race fix, but is being closed while these semantics are decided.
Reproduced again on 0.0.0-next-15329 at 2026-07-11T18:29:53Z (macOS 25.5.0, Warp). Session ses_0ae7c8e39ffeO1qHj9kTB5sVoj showed 5 shells in the footer after no shell commands remained.
This instance matches the non-default-location lifecycle problem in #36185. The session location is /Users/kit/code/open-source, while the TUI was launched from the nested packages/opencode checkout. The footer reads the active session location's shell cache, but bootstrap/reconnect refreshes only the startup/default location. The server's canonical shell list for /Users/kit/code/open-source now returns [], while the attached TUI retained five cached entries.
No fix attempted here. A focused TDD probe also confirmed that activating a non-default LocationProvider does not hydrate that location's shell inventory on current origin/v2 (66b9cc7931).
Activity
kitlangton commentedon Jul 11, 2026
Reproduced again on
0.0.0-next-15329at2026-07-11T18:29:53Z(macOS 25.5.0, Warp). Sessionses_0ae7c8e39ffeO1qHj9kTB5sVojshowed5 shellsin the footer after no shell commands remained.This instance matches the non-default-location lifecycle problem in #36185. The session location is
/Users/kit/code/open-source, while the TUI was launched from the nestedpackages/opencodecheckout. The footer reads the active session location's shell cache, but bootstrap/reconnect refreshes only the startup/default location. The server's canonical shell list for/Users/kit/code/open-sourcenow returns[], while the attached TUI retained five cached entries.No fix attempted here. A focused TDD probe also confirmed that activating a non-default
LocationProviderdoes not hydrate that location's shell inventory on currentorigin/v2(66b9cc7931).