[GH-ISSUE #5531] [Issue]: Capability Agents miss runtime context on manual and tracker reruns #3074

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

Originally created by @SpicyMarinara on GitHub (Aug 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5531

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Downloadable capability Agents can run through the /generate/retry-agents path without their registered runtime context being prepared. Memory Nag therefore receives a prompt that references allowedMemoryIds, but no <agent_runtime_context> block or candidate vault memories.

Expected behavior

Every Engine execution path for a capability Agent should invoke its registered prepareContext hook before building the provider request and its finalizeResult hook before applying or emitting the result. Memory Nag should receive a bounded shortlist of real vault memories and may select only IDs from that list.

Actual behavior

The tracker rerun/manual Agent path calls executeAgentBatch or executeAgent directly. It does not call prepareCapabilityAgentContexts or finalizeCapabilityAgentResults. Memory Nag can consequently return a hallucinated ID or nags_needed: false, and nothing reaches its tracker display.

Steps to reproduce

  1. Add Memory Nag 1.0.16 to a Roleplay chat and create vault memories.
  2. Trigger Memory Nag through a tracker rerun/manual Agent run.
  3. Inspect the Agent debug provider request and Memory Nag result.

Environment

  • Marinara Engine version: 2.4.4 (staging commit c2af537d9f63)
  • Install type: source
  • OS + version: macOS (version not provided)
  • Browser or app shell: not provided

Logs, screenshots, or video

The provider request contains the Memory Nag task and output contract but no <agent_runtime_context> block. The vault was verified to contain active memories and current participants. Private roleplay prompt content is intentionally omitted.

Additional context

The normal generation pipeline already prepares and finalizes capability Agent context. The missing integration is in the retry/manual route.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 25, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5531 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Downloadable capability Agents can run through the `/generate/retry-agents` path without their registered runtime context being prepared. Memory Nag therefore receives a prompt that references `allowedMemoryIds`, but no `<agent_runtime_context>` block or candidate vault memories. ## Expected behavior Every Engine execution path for a capability Agent should invoke its registered `prepareContext` hook before building the provider request and its `finalizeResult` hook before applying or emitting the result. Memory Nag should receive a bounded shortlist of real vault memories and may select only IDs from that list. ## Actual behavior The tracker rerun/manual Agent path calls `executeAgentBatch` or `executeAgent` directly. It does not call `prepareCapabilityAgentContexts` or `finalizeCapabilityAgentResults`. Memory Nag can consequently return a hallucinated ID or `nags_needed: false`, and nothing reaches its tracker display. ## Steps to reproduce 1. Add Memory Nag 1.0.16 to a Roleplay chat and create vault memories. 2. Trigger Memory Nag through a tracker rerun/manual Agent run. 3. Inspect the Agent debug provider request and Memory Nag result. ## Environment - Marinara Engine version: 2.4.4 (staging commit `c2af537d9f63`) - Install type: source - OS + version: macOS (version not provided) - Browser or app shell: not provided ## Logs, screenshots, or video The provider request contains the Memory Nag task and output contract but no `<agent_runtime_context>` block. The vault was verified to contain active memories and current participants. Private roleplay prompt content is intentionally omitted. ## Additional context The normal generation pipeline already prepares and finalizes capability Agent context. The missing integration is in the retry/manual route. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:59:23 +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#3074
No description provided.