Skip to content

feat(app): retry a failed run, switching to Automatic when the model caused it - #582

Merged
iamnbutler merged 3 commits into
mainfrom
fix-retry
Oct 22, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
fix-retry

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Adds Retry to a failed run (map ^525, ^526; decided in Q154).

  • When the chat's latest run failed and nothing has run since, a line under the composer reads "The last run failed." with Retry, for anyone who may invoke the agent. Retry asks the agent Try again. with the chat's current pick.
  • When the error is the model's or its key's (401/403/404, API key, unauthorized, not found, no access…), the line says so ahead of time: "The last run failed on openai/gpt-4. Retry switches this chat to Automatic." Retry then sends the ask with a new automatic flag, which makes the channel replace the chat's model with its own choice (the host default, or the first usable model), resets the composer's pick to Automatic, and confirms in a toast.
  • ask gains automatic?: boolean in @ace/channel/protocol; older hosts ignore it and keep the chat's model.

Smoke-tested on a loopback host (port 4432, isolated home/config/keychain) with headless Playwright: ace ask retry --model openai/gpt-4 failed with OpenAI's 404; the app showed the Automatic line, Retry showed the "Switched this chat to Automatic" toast, the line went away, and the chat answered Hello! on claude-opus-5-5.

Built in Ace

No. Built with Claude Code as a fix-train worker against the Ace map, outside Ace (#5).

…caused it

Why: packages/channel/src/channel.ts#class Channel | an ask with `automatic` and no model must replace the chat's model with the channel's choice, so Retry can leave a model that fails
@iamnbutler
iamnbutler merged commit a2037a2 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-retry branch October 22, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant