[PR #7] [CLOSED] Defer agent failure toasts until retry is exhausted #4387

Closed
opened 2026-10-22 04:07:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7
Author: @Copilot
Created: 3/9/2026
Status: ❌ Closed

Base: release/1.2.0 ← Head: copilot/sub-pr-1-please-work


📝 Commits (2)

  • aa22528 Initial plan
  • 44cff3a Defer agent failure toasts until retry is exhausted

📊 Changes

1 file changed (+9 additions, -8 deletions)

View changed files

📝 packages/client/src/hooks/use-generate.ts (+9 -8)

📄 Description

The server auto-retries failed agents and can emit a successful agent_result after an initial failure, but the client was toasting on the first failed result — showing an error even when the final outcome was success.

Changes

  • generate flow — Removed immediate toast.error from case "agent_result" on failure. Error surfacing is now fully delegated to the existing agents_retry_failed handler, which only fires after all server-side retries are exhausted.
  • retryAgents flow — Same immediate failure toast removed from its agent_result case. Added a case "agents_retry_failed" handler (previously absent) so this path also defers failure notification until retry is exhausted.

Before:

case "agent_result": {
  // ...store result...
  if (!result.success && result.error) {
    toast.error(`Agent "${result.agentName}" failed: ${result.error}`);
  }
}

After:

case "agent_result": {
  // ...store result...
  // no toast — failure surfaced only via agents_retry_failed
}
case "agents_retry_failed": {
  // fires only after all retries exhausted
  toast.error(`${types.length} agent${...} failed after retry...`);
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 3/9/2026 **Status:** ❌ Closed **Base:** `release/1.2.0` ← **Head:** `copilot/sub-pr-1-please-work` --- ### 📝 Commits (2) - [`aa22528`](https://github.com/Pasta-Devs/Marinara-Engine/commit/aa225285fd46393a4cc9c11d760a491ce1bebac2) Initial plan - [`44cff3a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/44cff3a9436b3d66fce1a1e48abee07ace049a43) Defer agent failure toasts until retry is exhausted ### 📊 Changes **1 file changed** (+9 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/hooks/use-generate.ts` (+9 -8) </details> ### 📄 Description The server auto-retries failed agents and can emit a successful `agent_result` after an initial failure, but the client was toasting on the first failed result — showing an error even when the final outcome was success. ## Changes - **`generate` flow** — Removed immediate `toast.error` from `case "agent_result"` on failure. Error surfacing is now fully delegated to the existing `agents_retry_failed` handler, which only fires after all server-side retries are exhausted. - **`retryAgents` flow** — Same immediate failure toast removed from its `agent_result` case. Added a `case "agents_retry_failed"` handler (previously absent) so this path also defers failure notification until retry is exhausted. **Before:** ```ts case "agent_result": { // ...store result... if (!result.success && result.error) { toast.error(`Agent "${result.agentName}" failed: ${result.error}`); } } ``` **After:** ```ts case "agent_result": { // ...store result... // no toast — failure surfaced only via agents_retry_failed } case "agents_retry_failed": { // fires only after all retries exhausted toast.error(`${types.length} agent${...} failed after retry...`); } ``` <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/SpicyMarinara/Marinara-Engine/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:07:09 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4387
No description provided.