Repository navigation
feat(opencode): TUI half declares working/idle from execution events (#310) - #317
Merged
amirlehmam merged 2 commits intoOct 21, 2026
Merged
Conversation
…mirlehmam#310) Phase 3b of the CLI-side (TUI) half: a pane whose TUI is a client of a remote or shared server now reads "working" while a turn runs and "idle" when it ends, instead of staying unknown. `session.execution.started` declares `report-agent --run-depth 1`; `succeeded`/`failed`/`interrupted` declare `--run-depth 0`. The values are ABSOLUTE — never `--run-start`/`--run-end` — so a second producer converges instead of inflating a refcount (the constraint from the phase-3 review). Running sessions are tracked by id, the same principle 01df550 applied to asks: hosting only gates a START, so a turn that ends after the user switches tabs still clears, and a subagent's end cannot return the pane to idle while its parent is still running. Depth changes are deduped, so replayed execution events cannot spawn redundant CLI calls. Marker 3 → 4. Docs and CLAUDE.md updated. Part of amirlehmam#310
…not overtake its start Each report-agent call is its own CLI process; spawned a few ms apart they race to the pipe, and a short turn's --run-depth 0 landing before its 1 left the pane 'working' for the 15-minute trust window (amirlehmam#151). callWmux now reports completion on every path, and the activity reporter keeps one call in flight, collapsing whatever changed meanwhile into the latest wanted depth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 3b of the CLI-side (TUI) half, following the constraint agreed in #310 (and the lesson from 01df550): a pane whose TUI is a client of a remote/shared server now reads working while a turn runs and idle when it ends, instead of staying
unknown.session.execution.startedreport-agent --run-depth 1session.execution.succeeded/.failed/.interruptedreport-agent --run-depth 0--run-start/--run-end; two producers converge on the same declaration instead of inflating a refcount.started/endedevents cannot spawn redundant CLI calls.Tests
Nine new core cases (started/ended, failed/interrupted, replay dedupe, view-moved clear, unhosted ignored, last-running-wins, no start → no report, no refcount flags, missing session id) plus entry-shape assertions (execution subscriptions, marker 4). 69 tests in the two TUI suites, watched red first. Full suite: only the pre-existing Windows/
path.joinfailures that also fail on untouched master in this container. Typecheck and entry syntax clean.Known gap (deliberate)
No seeding on load: a turn already in flight when the TUI starts is not shown until the next
started. Seeding viatabs.list()/session.statusneeds those shapes verified; happy to add it once they are.Live check after merge: install marker 4 (
wmux opencode-tui), submit a prompt → sidebar shows Working; completion → Idle; switch tabs mid-run → still clears. A TUI killed mid-run decays tounknownafter main's 15-minute trust window, the same rule every producer lives under.Part of #310