[GH-ISSUE #1201] [Issue]: Noodle timeline refresh drops its context body on small context windows #613

Closed
opened 2026-10-20 17:29:03 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1201

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Noodle bundles a vendored copy of the Engine's context fitter (sources/engine/packages/server/src/services/llm/base-provider.ts, unchanged since 2026-07-14) that predates Engine #4124. When a timeline prompt plus Noodle's answer reserve (4096 + 1024 tokens per account) does not fit the connection's Max Context, it deletes the whole context message (accounts, handles, character profiles, chats and the timeline) and keeps the full max_tokens. The model only sees the rules and the JSON template.

Affected package

noodle, every build from 1.2.20 through 1.4.0.

Expected behavior

The whole timeline prompt reaches the model with a smaller answer limit, or the refresh stops with a clear message when the prompt cannot fit.

Actual behavior

The backend receives only the system prompt and the JSON format. The model writes a short answer about nobody, and the correction pass is cut the same way. Debug Mode's [debug/noodle] Prompt sent to model still prints the full prompt, because it is logged before the fit. The Engine console shows [LLM context] Trimmed prompt for <model> from ~X to ~Y tokens (budget ~B, maxContext=C).

Steps to reproduce

  1. Use a local OpenAI-compatible connection (for example KoboldCpp) whose Max Context is 16384. Engine 2.4.6 fills this in from the backend on every page load.
  2. Invite four or more characters with long cards and refresh the timeline.
  3. The backend receives about 1.5k tokens: the system rules and the JSON format, with no accounts or profiles.

Environment

  • Marinara Engine version: 2.4.6 and current staging
  • Package version: Noodle 1.2.20 to 1.4.0
  • Install type: any
  • OS + version: any
  • Browser or app shell: any

Logs, screenshots, or video

Reproduced end to end in a real Engine with a fake backend that records every request; the captures are summarized in #1199.

Additional context

Reported downstream as Pasta-Devs/Marinara-Engine#6973 (Gemma 4 on KoboldCpp). It is not yet confirmed that this is that reporter's trigger: their KoboldCpp runs at 49152, where the cut needs a very large prompt. Fix: #1199 (Noodle 1.4.1).

Template check

Please uncheck (untick) 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 @SpicyMarinara on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1201 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Noodle bundles a vendored copy of the Engine's context fitter (`sources/engine/packages/server/src/services/llm/base-provider.ts`, unchanged since 2026-07-14) that predates Engine #4124. When a timeline prompt plus Noodle's answer reserve (4096 + 1024 tokens per account) does not fit the connection's Max Context, it deletes the whole context message (accounts, handles, character profiles, chats and the timeline) and keeps the full `max_tokens`. The model only sees the rules and the JSON template. ## Affected package `noodle`, every build from 1.2.20 through 1.4.0. ## Expected behavior The whole timeline prompt reaches the model with a smaller answer limit, or the refresh stops with a clear message when the prompt cannot fit. ## Actual behavior The backend receives only the system prompt and the JSON format. The model writes a short answer about nobody, and the correction pass is cut the same way. Debug Mode's `[debug/noodle] Prompt sent to model` still prints the full prompt, because it is logged before the fit. The Engine console shows `[LLM context] Trimmed prompt for <model> from ~X to ~Y tokens (budget ~B, maxContext=C)`. ## Steps to reproduce 1. Use a local OpenAI-compatible connection (for example KoboldCpp) whose Max Context is 16384. Engine 2.4.6 fills this in from the backend on every page load. 2. Invite four or more characters with long cards and refresh the timeline. 3. The backend receives about 1.5k tokens: the system rules and the JSON format, with no accounts or profiles. ## Environment - Marinara Engine version: 2.4.6 and current staging - Package version: Noodle 1.2.20 to 1.4.0 - Install type: any - OS + version: any - Browser or app shell: any ## Logs, screenshots, or video Reproduced end to end in a real Engine with a fake backend that records every request; the captures are summarized in #1199. ## Additional context Reported downstream as Pasta-Devs/Marinara-Engine#6973 (Gemma 4 on KoboldCpp). It is not yet confirmed that this is that reporter's trigger: their KoboldCpp runs at 49152, where the cut needs a very large prompt. Fix: #1199 (Noodle 1.4.1). ## Template check Please **uncheck (untick)** 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-20 17:29:03 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Oct 2, 2026):

Fixed on staging by #1199 (Noodle 1.4.1). Timeline refreshes now keep the whole prompt and lower the answer limit instead, and stop with a clear message when the prompt can't fit. This stays open until the fix reaches main.

<!-- gh-comment-id:5961429648 --> @SpicyMarinara commented on GitHub (Oct 2, 2026): Fixed on staging by #1199 (Noodle 1.4.1). Timeline refreshes now keep the whole prompt and lower the answer limit instead, and stop with a clear message when the prompt can't fit. This stays open until the fix reaches main.
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-Agents#613
No description provided.