[GH-ISSUE #2490] [Issue]: 13-AGENT-ERROR-empty-response-failures disabled custom agents vanish without failure #1233

Closed
opened 2026-10-21 05:29:32 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2490

Summary

Surface 13-AGENT-ERROR-empty-response-failures: disabled custom agents that are active in a chat or explicitly requested for retry can be filtered out before the agent runtime creates a failed AgentResult. The UI then has no failure to show.

Linked tracker: #2482

Expected behavior

When an active/requested custom agent is disabled and would otherwise be selected for generation or retry, Marinara should surface an agent failure instead of silently dropping it.

Actual behavior

Refactor filters rows with enabled === false before requested/scoped matching in src/engine/generation/agent-runner.ts, then returns no skipped failure for that agent.

Steps to reproduce

  1. Enable agents for a chat and include a custom agent in activeAgentIds, or retry that agent explicitly.
  2. Disable the matching custom agent row.
  3. Generate or retry agents.
  4. Observe that the agent can disappear without a failed AgentResult, failure toast, retry entry, or debug failure row.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor branch, Batch 6 static parityscan on 2026-06-06
  • Run mode: not run; static trace only
  • OS + version: not relevant
  • Node + pnpm versions: not relevant
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: agent runtime selection before provider call

Logs, screenshots, or video

Proof:

  • Refactor filters disabled rows before explicit requested/scoped matching: src/engine/generation/agent-runner.ts:1080, src/engine/generation/agent-runner.ts:1083, src/engine/generation/agent-runner.ts:1093.
  • Refactor creates skipped failure results for dangling connections, but not disabled rows: src/engine/generation/agent-runner.ts:1012, src/engine/generation/agent-runner.ts:1026, src/engine/generation/agent-runner.ts:1027, src/engine/generation/agent-runner.ts:1153.
  • Refactor emits only skippedResults and normal results to UI failure handling: src/engine/generation/agent-runner.ts:1108, src/engine/generation/agent-runner.ts:1182, src/engine/generation/agent-runner.ts:1640; src/features/runtime/generation/hooks/use-generate.ts:1090, src/features/runtime/generation/hooks/use-generate.ts:1091.
  • Legacy used agentsStore.list() for generation and retry config selection rather than listEnabled(): packages/server/src/services/storage/agents.storage.ts:147, packages/server/src/routes/generate.routes.ts:2267, packages/server/src/routes/generate.routes.ts:3972, packages/server/src/routes/generate/retry-agents-route.ts:501.

Files inspected:

  • src/engine/generation/agent-runner.ts
  • src/engine/agents-runtime/executor/agent-executor.ts
  • src/features/runtime/generation/hooks/use-generate.ts
  • src/features/catalog/agents/components/AgentDebugPanel.tsx
  • src/features/catalog/agents/components/AgentThoughtBubbles.tsx
  • src/shared/lib/agent-failures.ts
  • src/shared/stores/agent.store.ts
  • packages/server/src/routes/generate.routes.ts on upstream/main
  • packages/server/src/routes/generate/retry-agents-route.ts on upstream/main
  • packages/server/src/services/storage/agents.storage.ts on upstream/main
  • packages/server/src/services/agents/agent-executor.ts on upstream/main
  • packages/client/src/hooks/use-generate.ts on upstream/main
  • packages/client/src/components/agents/AgentDebugPanel.tsx on upstream/main

Regression notes

Legacy did not filter disabled custom agent rows out at config-list entry for the inspected generation and retry paths. Refactor filters them before creating a failure result.

Additional context

Acceptance criteria:

  • Active or explicitly requested disabled custom agents produce a failed AgentResult with a clear error.
  • The failure reaches existing UI handling for failure state, retry, toast, and debug visibility.
  • Enabled agents and disabled non-selected agents keep current behavior.
  • Existing empty-response and dangling-connection failure behavior remains intact.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Jun 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2490 ## Summary Surface 13-AGENT-ERROR-empty-response-failures: disabled custom agents that are active in a chat or explicitly requested for retry can be filtered out before the agent runtime creates a failed AgentResult. The UI then has no failure to show. Linked tracker: #2482 ## Expected behavior When an active/requested custom agent is disabled and would otherwise be selected for generation or retry, Marinara should surface an agent failure instead of silently dropping it. ## Actual behavior Refactor filters rows with `enabled === false` before requested/scoped matching in `src/engine/generation/agent-runner.ts`, then returns no skipped failure for that agent. ## Steps to reproduce 1. Enable agents for a chat and include a custom agent in `activeAgentIds`, or retry that agent explicitly. 2. Disable the matching custom agent row. 3. Generate or retry agents. 4. Observe that the agent can disappear without a failed AgentResult, failure toast, retry entry, or debug failure row. ## Impact area <!-- Check the areas you think are relevant. Leave uncertain items unchecked. --> - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor branch, Batch 6 static parityscan on 2026-06-06 - Run mode: not run; static trace only - OS + version: not relevant - Node + pnpm versions: not relevant - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: agent runtime selection before provider call ## Logs, screenshots, or video Proof: - Refactor filters disabled rows before explicit requested/scoped matching: `src/engine/generation/agent-runner.ts:1080`, `src/engine/generation/agent-runner.ts:1083`, `src/engine/generation/agent-runner.ts:1093`. - Refactor creates skipped failure results for dangling connections, but not disabled rows: `src/engine/generation/agent-runner.ts:1012`, `src/engine/generation/agent-runner.ts:1026`, `src/engine/generation/agent-runner.ts:1027`, `src/engine/generation/agent-runner.ts:1153`. - Refactor emits only `skippedResults` and normal results to UI failure handling: `src/engine/generation/agent-runner.ts:1108`, `src/engine/generation/agent-runner.ts:1182`, `src/engine/generation/agent-runner.ts:1640`; `src/features/runtime/generation/hooks/use-generate.ts:1090`, `src/features/runtime/generation/hooks/use-generate.ts:1091`. - Legacy used `agentsStore.list()` for generation and retry config selection rather than `listEnabled()`: `packages/server/src/services/storage/agents.storage.ts:147`, `packages/server/src/routes/generate.routes.ts:2267`, `packages/server/src/routes/generate.routes.ts:3972`, `packages/server/src/routes/generate/retry-agents-route.ts:501`. Files inspected: - `src/engine/generation/agent-runner.ts` - `src/engine/agents-runtime/executor/agent-executor.ts` - `src/features/runtime/generation/hooks/use-generate.ts` - `src/features/catalog/agents/components/AgentDebugPanel.tsx` - `src/features/catalog/agents/components/AgentThoughtBubbles.tsx` - `src/shared/lib/agent-failures.ts` - `src/shared/stores/agent.store.ts` - `packages/server/src/routes/generate.routes.ts` on `upstream/main` - `packages/server/src/routes/generate/retry-agents-route.ts` on `upstream/main` - `packages/server/src/services/storage/agents.storage.ts` on `upstream/main` - `packages/server/src/services/agents/agent-executor.ts` on `upstream/main` - `packages/client/src/hooks/use-generate.ts` on `upstream/main` - `packages/client/src/components/agents/AgentDebugPanel.tsx` on `upstream/main` ## Regression notes Legacy did not filter disabled custom agent rows out at config-list entry for the inspected generation and retry paths. Refactor filters them before creating a failure result. ## Additional context Acceptance criteria: - Active or explicitly requested disabled custom agents produce a failed AgentResult with a clear error. - The failure reaches existing UI handling for failure state, retry, toast, and debug visibility. - Enabled agents and disabled non-selected agents keep current behavior. - Existing empty-response and dangling-connection failure behavior remains intact. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:29:32 +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#1233
No description provided.