Repository navigation
Unlock input after ACP error responses on protocol v1 - #34
Merged
Merged
Conversation
When an agent replies to session/prompt with an error on protocol v1, only the status changed to Error; active_work stayed true, leaving the composer permanently disabled (.disabled(agent.active_work)). Mirror the v2 cleanup so the turn is released and the prompt can be resent. Repro: goose acp relaying a provider failure, e.g. a transient 403 from the model gateway, shows 'ACP error: Authentication required' and the input field never recovers.
Contributor
Author
|
@domenkozar @vimjoyer This looks like a simple fix. |
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.
What
The composer becomes permanently unresponsive after an agent answers
session/promptwith an error on protocol v1.Root cause
In
src/session.rs, the JSON-RPC error branch only releasedactive_workfor v2 sessions. On v1 it setStatus::Errorbut leftactive_work = true, and the composer is bound via.disabled(agent.active_work)— so the field stays dead until the session is restarted. The stuck flag is also persisted aswas_workingin the saved config.Reproduced live:
goose acprelayed a transient provider 403 asACP error: Authentication required; the pane never accepted input again.Fix
Mirror the v2 cleanup in the v1 branch of the error handler (clear
active_work,awaiting_response,cancel_requested,active_prompt). Status still lands onErrorfor v1, vsIdlefor v2.Test
Added
v1_prompt_error_releases_turn_and_unlocks_input: v1 agent mid-turn receives an error response with request id ≥ 3 → assertsactive_work/awaiting_responsecleared,active_promptdropped,was_workingfalse in the snapshot, and the system log entry present.cargo test --bin agentaps v1_prompt— 2 passed.