Skip to content

feat(ui): add retry button for failed tool calls#483

Open
JDis03 wants to merge 1 commit into
NeuralNomadsAI:devfrom
JDis03:feature/retry-failed-tool-call-473
Open

feat(ui): add retry button for failed tool calls#483
JDis03 wants to merge 1 commit into
NeuralNomadsAI:devfrom
JDis03:feature/retry-failed-tool-call-473

Conversation

@JDis03
Copy link
Copy Markdown

@JDis03 JDis03 commented May 18, 2026

Summary

Fixes #473. When a tool call fails (rate limit, provider error, etc.), users can now retry by reverting to the original user message.

How it works

  • A Retry action appears in the tool call overflow menu when the tool state is error.
  • Clicking retry calls the existing revert flow, which finds the user message before the failed tool call, reverts all messages after it, and restores the original prompt text in the input field.
  • The user can then change the model, edit the prompt, and resend.

Files changed

  • packages/ui/src/components/message-block.tsx: Added onRevert prop to ToolCallItem, handleRetry function, and retry menu item in actionMenuItems().
  • All locale toolCall.ts files: Added toolCall.retry.label and toolCall.retry.title strings (en, es, fr, ja, ru, he, zh-Hans).

Validation

  • npm run typecheck --workspace @codenomad/ui

Fixes NeuralNomadsAI#473. When a tool call fails (rate limit, provider error, etc.),
users can now retry by reverting to the original user message.

How it works:
- A "Retry" action appears in the tool call overflow menu when the
  tool state is "error".
- Clicking retry calls the existing revert flow, which finds the user
  message before the failed tool call, reverts all messages after it,
  and restores the original prompt text in the input field.
- The user can then change the model, edit the prompt, and resend.

Files changed:
- message-block.tsx: Added onRevert prop to ToolCallItem, handleRetry
  function, and retry menu item in actionMenuItems().
- All locale toolCall.ts files: Added toolCall.retry.label and
  toolCall.retry.title strings.

Validation:
- npm run typecheck --workspace @codenomad/ui
@github-actions
Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/26045046321

Artifacts expire in 7 days.
Artifacts:

  • pr-483-2c727c6503f2b3fabbe322c5e9a3690494611d9f-tauri-windows
  • pr-483-2c727c6503f2b3fabbe322c5e9a3690494611d9f-tauri-linux
  • pr-483-2c727c6503f2b3fabbe322c5e9a3690494611d9f-tauri-macos
  • pr-483-2c727c6503f2b3fabbe322c5e9a3690494611d9f-electron-macos
  • pr-483-2c727c6503f2b3fabbe322c5e9a3690494611d9f-tauri-macos-arm64
  • pr-483-2c727c6503f2b3fabbe322c5e9a3690494611d9f-electron-windows
  • pr-483-2c727c6503f2b3fabbe322c5e9a3690494611d9f-electron-linux

@shantur
Copy link
Copy Markdown
Collaborator

shantur commented May 18, 2026

Hey @JDis03 ,

Revert to last user message is already possible.
Giving user an option to retry failed tool call and reverting to last message can be destructive. OpenCode reverts changes on disk too by keeping snapshots.
From a user point of view retrying a tool call would mean actually just retry the tool call. I don't think this will be a good UX and can be confusing.

Thanks

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.

Is it possible to retry when tool fails?

2 participants