[GH-ISSUE #3878] [Feature]: Manually re-run a specific custom agent from Chat Settings #2094

Closed
opened 2026-10-21 05:45:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kh0p on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3878

What problem does this solve?

The retry-agents backend (POST /retry-agents) and the client hook useGenerate().retryAgents(chatId, agentTypes, options) are both fully generic — they accept any agentTypes: string[] and can target the last message for any active agent. But every existing UI caller hardcodes a single specific agent type (e.g. ["illustrator"] for the Illustrate button, ["lorebook-keeper"] for the Lorebook Keeper's "Backfill Unprocessed" button), or restricts to built-in tracker agents via isBuiltInTrackerAgentType.

This means a user with a custom agent attached to a chat (e.g. a custom illustrator/prompt-writer agent, a custom continuity/style agent, etc.) has no way to manually re-run just that agent on the last message. If a custom agent's output looked wrong, or the user just wants to regenerate its result without regenerating the whole assistant turn, there is currently no button for that.

Proposed solution

Add a small "re-run" control next to each active custom agent in Chat Settings → Agents → Custom Agents, alongside the existing "Remove from chat" button. Clicking it calls the already-generic retryAgents(chatId, [agentId]) for that specific agent only.

This mirrors the existing per-tracker refresh button pattern already used for built-in trackers in the Roleplay HUD panels (TrackerSectionRefresh / onRerunSingleTracker), just extended to custom agents where that pattern doesn't currently apply.

Alternatives considered

  • Extending isBuiltInTrackerAgentType-gated retry buttons to also cover custom agents — rejected because that gate is specifically for the RP HUD tracker panels (stats/quests/etc.), which custom agents (e.g. image-prompt or style agents) don't belong in contextually.
  • A generic dropdown somewhere in the chat toolbar listing all active agent types — more visible, but a bigger UI surface change than needed for a first pass; the existing Custom Agents settings card was already the natural, currently-under-used spot for this.

Additional context

No server-side change needed — resolveActiveRetryAgentTypes in retry-agents-route.ts already permits retrying any agent type present in chatMeta.activeAgentIds, built-in or custom.

  • I DID NOT read this template and provide the requested details.
Originally created by @kh0p on GitHub (Jul 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3878 ## What problem does this solve? The retry-agents backend (`POST /retry-agents`) and the client hook `useGenerate().retryAgents(chatId, agentTypes, options)` are both fully generic — they accept any `agentTypes: string[]` and can target the last message for any active agent. But every existing UI caller hardcodes a single specific agent type (e.g. `["illustrator"]` for the Illustrate button, `["lorebook-keeper"]` for the Lorebook Keeper's "Backfill Unprocessed" button), or restricts to built-in tracker agents via `isBuiltInTrackerAgentType`. This means a user with a **custom** agent attached to a chat (e.g. a custom illustrator/prompt-writer agent, a custom continuity/style agent, etc.) has no way to manually re-run just that agent on the last message. If a custom agent's output looked wrong, or the user just wants to regenerate its result without regenerating the whole assistant turn, there is currently no button for that. ## Proposed solution Add a small "re-run" control next to each active custom agent in Chat Settings → Agents → Custom Agents, alongside the existing "Remove from chat" button. Clicking it calls the already-generic `retryAgents(chatId, [agentId])` for that specific agent only. This mirrors the existing per-tracker refresh button pattern already used for built-in trackers in the Roleplay HUD panels (`TrackerSectionRefresh` / `onRerunSingleTracker`), just extended to custom agents where that pattern doesn't currently apply. ## Alternatives considered - Extending `isBuiltInTrackerAgentType`-gated retry buttons to also cover custom agents — rejected because that gate is specifically for the RP HUD tracker panels (stats/quests/etc.), which custom agents (e.g. image-prompt or style agents) don't belong in contextually. - A generic dropdown somewhere in the chat toolbar listing all active agent types — more visible, but a bigger UI surface change than needed for a first pass; the existing Custom Agents settings card was already the natural, currently-under-used spot for this. ## Additional context No server-side change needed — `resolveActiveRetryAgentTypes` in `retry-agents-route.ts` already permits retrying any agent type present in `chatMeta.activeAgentIds`, built-in or custom. - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45:20 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 20, 2026):

Thank you!!!

<!-- gh-comment-id:5025758923 --> @SpicyMarinara commented on GitHub (Jul 20, 2026): Thank you!!!
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#2094
No description provided.