fix: amplifier panes no longer stuck blue on provider errors - #639
Merged
Conversation
…tion findings Full-corpus census (16,326 files / 4,718 root turns) refines the stray rate to 0.064% (3/4,718, statuses success x2 / error x1 - no status gate can block them) and adds the 3.3% OC-no-PC exposure figure; CLI source reading confirms orchestrator:complete emission is structural (always-path in loop-streaming _execute_one_turn) while falsifying cross-orchestrator uniformity (loop-agent never emits OC - boundary set is additive, so no regression); parent_id confirmed session-scoped (delegate:* uses parent_session_id); spec text now pins verified versions (CLI 2026.08.05-5462f1e, core 1.6.0, schema amplifier.log 1.0.0, loop-streaming e5438b4c9) and documents residual hard-cancel/goal-mode gaps; e2e local run feasibility verified (chromium-1208 present, --list discovery green); fixed a 2-space over-indent in the Task 6 Site D needle.
… the events reducer
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.
Problem
Freshell derives busy/blue status for amplifier terminal panes by tailing the Amplifier CLI's events.jsonl. The reducer entered busy on
prompt:submitbut cleared it ONLY onprompt:complete/session:end(or PTY exit).When an amplifier turn dies on a provider error (observed live: Anthropic mid-stream
overloaded_error), the CLI writesprovider:error+orchestrator:completebut neverprompt:complete— so the pane stayed stuck blue forever (the 120s deadman deliberately never fabricates completions).Verified against a real stuck session: 6 prompt:submit vs 5 prompt:complete, log ends at orchestrator:complete.
Solution
Teaches BOTH event reducers to treat
orchestrator:completeas a turn-end boundary:server/coding-cli/amplifier-events-reducer.tscrates/freshell-activity/src/amplifier/reducer.rs(kept 1:1 sync)Implementation details
Testing
Reviews