[GH-ISSUE #6308] [Issue]: Built-in Tracker Agent Sections are ignored and tracker state is injected at the default context position #3519

Closed
opened 2026-10-21 06:03:54 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @minikkeuen on GitHub (Sep 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6308

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Built-in Tracker Agent Sections added to a preset do not control where tracker data is inserted into the prompt.

The Agent Section remains empty, while the tracker state is still automatically injected at its default position near the end of the context.

Expected behavior

When a built-in Tracker is configured with Add as Prompt Section and its Agent Section is added to a preset, the tracker data should be inserted at that Agent Section's position.

If the Agent Section is present, the default automatic tracker injection should not also be used for that tracker.

Actual behavior

The built-in Tracker Agent Section is ignored.

In the assembled prompt, no tracker data appears at the position of the Agent Section. Instead, the tracker state is injected at the normal automatic tracker context position near the end of the Chat History/context.

I confirmed this using Exact Text Model Request in Peek Prompt, so this is present in the actual request sent to the model rather than only in Live Preview/Prompt Preview.

I reproduced this behavior with Character Tracker, Persona Stats, Inventory Tracker, and Quest Tracker.

Steps to reproduce

  1. Enable a built-in Tracker with Add as Prompt Section enabled.
  2. Add that Tracker's Agent Section to a preset and place it somewhere other than the default tracker context position.
  3. Use the preset in a chat and generate a response so that tracker state exists.
  4. Open Peek Prompt for the generated response and inspect Exact Text Model Request.
  5. Check the position where the Tracker Agent Section was placed.
  6. Observe that no tracker data is inserted there.
  7. Check the end of the Chat History/context and observe that the tracker state is instead injected at the default automatic position.

Environment

  • Marinara Engine version: 2.4.6
  • Install type: source
  • OS + version: macOS 26.6.2
  • Browser or app shell: Safari

Logs, screenshots, or video

Screenshots below show:

  1. The built-in Tracker Agent Section placed in the preset.
  2. The corresponding Exact Text Model Request, where the Agent Section is empty and the tracker state is instead injected at the default context position.
Image Image

Additional context

The current implementation appears to explicitly exclude built-in tracker types from normal Agent marker expansion and instead handles them through the separate committed tracker context injection path. This may explain why the Agent Section exposed by the preset editor does not affect their placement.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @minikkeuen on GitHub (Sep 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6308 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Built-in Tracker Agent Sections added to a preset do not control where tracker data is inserted into the prompt. The Agent Section remains empty, while the tracker state is still automatically injected at its default position near the end of the context. ## Expected behavior When a built-in Tracker is configured with `Add as Prompt Section` and its Agent Section is added to a preset, the tracker data should be inserted at that Agent Section's position. If the Agent Section is present, the default automatic tracker injection should not also be used for that tracker. ## Actual behavior The built-in Tracker Agent Section is ignored. In the assembled prompt, no tracker data appears at the position of the Agent Section. Instead, the tracker state is injected at the normal automatic tracker context position near the end of the Chat History/context. I confirmed this using `Exact Text Model Request` in Peek Prompt, so this is present in the actual request sent to the model rather than only in Live Preview/Prompt Preview. I reproduced this behavior with Character Tracker, Persona Stats, Inventory Tracker, and Quest Tracker. ## Steps to reproduce 1. Enable a built-in Tracker with `Add as Prompt Section` enabled. 2. Add that Tracker's Agent Section to a preset and place it somewhere other than the default tracker context position. 3. Use the preset in a chat and generate a response so that tracker state exists. 4. Open Peek Prompt for the generated response and inspect `Exact Text Model Request`. 5. Check the position where the Tracker Agent Section was placed. 6. Observe that no tracker data is inserted there. 7. Check the end of the Chat History/context and observe that the tracker state is instead injected at the default automatic position. ## Environment - Marinara Engine version: 2.4.6 - Install type: source - OS + version: macOS 26.6.2 - Browser or app shell: Safari ## Logs, screenshots, or video Screenshots below show: 1. The built-in Tracker Agent Section placed in the preset. 2. The corresponding `Exact Text Model Request`, where the Agent Section is empty and the tracker state is instead injected at the default context position. <img width="656" height="445" alt="Image" src="https://github.com/user-attachments/assets/4236c074-9b91-4a60-b1bf-8c8a8cd7ecca" /> <img width="813" height="751" alt="Image" src="https://github.com/user-attachments/assets/55b4944c-bf32-4a33-8a4c-746229c08207" /> ## Additional context The current implementation appears to explicitly exclude built-in tracker types from normal Agent marker expansion and instead handles them through the separate committed tracker context injection path. This may explain why the Agent Section exposed by the preset editor does not affect their placement. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:03:54 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 18, 2026):

Implementation owner: Codex working for @SpicyMarinara in the September 18 issue sweep. No open or draft PR is linked to this issue. I am tracing the existing implementation and will link the draft PR here; fixes will reuse the existing paths and include focused regression evidence.

<!-- gh-comment-id:5727503712 --> @SpicyMarinara commented on GitHub (Sep 18, 2026): Implementation owner: Codex working for @SpicyMarinara in the September 18 issue sweep. No open or draft PR is linked to this issue. I am tracing the existing implementation and will link the draft PR here; fixes will reuse the existing paths and include focused regression evidence.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 18, 2026):

Implemented and merged into staging in #6310 (be8ac7334d). All 41 checks passed on the final reviewed commit. Available on staging; this does not claim a stable release.

<!-- gh-comment-id:5728748654 --> @SpicyMarinara commented on GitHub (Sep 18, 2026): Implemented and merged into staging in #6310 (be8ac7334dd8ce309f25da8446a0fa68de67aae0). All 41 checks passed on the final reviewed commit. Available on staging; this does not claim a stable release.
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#3519
No description provided.