[GH-ISSUE #6480] Bug: Schedule generation continues indefinitely after leaving the schedule editor #3631

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

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

Originally assigned to: @SpicyMarinara on GitHub.

I encountered an issue where Marinara continued trying to generate a schedule indefinitely after I had already stopped working on it and left the schedule editor.

I started generating a schedule, but the local LLM was unable to produce a valid result. I eventually abandoned the process and left the editor.

However, Marinara continued sending generation requests in the background. With KoboldCpp, I could see that the LLM was still generating requests continuously, even though I was no longer interacting with the schedule editor.

This can result in an effectively infinite generation loop, especially with local LLMs that cannot produce the expected schedule format.

Expected behavior

If schedule generation fails or produces an invalid result repeatedly, Marinara should stop retrying after a reasonable number of attempts.

Also, leaving/closing the schedule editor should cancel any ongoing schedule generation and prevent further automatic retries.

Ideally:

generation should have a clear retry limit;
failed validation should not trigger infinite retries;
leaving the editor should cancel the generation process;
the user should be able to manually retry if needed;
any background generation should have a visible status and a way to cancel it.

This is particularly important with local backends, where an endless retry loop can keep the LLM occupied indefinitely and consume significant resources.

Originally created by @scavru on GitHub (Sep 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6480 Originally assigned to: @SpicyMarinara on GitHub. I encountered an issue where Marinara continued trying to generate a schedule indefinitely after I had already stopped working on it and left the schedule editor. I started generating a schedule, but the local LLM was unable to produce a valid result. I eventually abandoned the process and left the editor. However, Marinara continued sending generation requests in the background. With KoboldCpp, I could see that the LLM was still generating requests continuously, even though I was no longer interacting with the schedule editor. This can result in an effectively infinite generation loop, especially with local LLMs that cannot produce the expected schedule format. Expected behavior If schedule generation fails or produces an invalid result repeatedly, Marinara should stop retrying after a reasonable number of attempts. Also, leaving/closing the schedule editor should cancel any ongoing schedule generation and prevent further automatic retries. Ideally: generation should have a clear retry limit; failed validation should not trigger infinite retries; leaving the editor should cancel the generation process; the user should be able to manually retry if needed; any background generation should have a visible status and a way to cancel it. This is particularly important with local backends, where an endless retry loop can keep the LLM occupied indefinitely and consume significant resources.
bsakaguchi 2026-10-21 06:05:17 +07:00
Author
Owner

@scavru commented on GitHub (Sep 21, 2026):

The schedule auto-generation seems to trigger by itself even though I did not manually regenerate or modify the schedule.

When the generation fails because the LLM response cannot be parsed as valid JSON, the process appears to retry continuously, generating the same error over and over again.

Relevant log:

[schedule] ERROR for Linnea: OpenAI chatComplete() non-stream response:
Failed to parse JSON response
(Unexpected token 'H', "HTTP/1.0 2"... is not valid JSON).

The response body starts with:

HTTP/1.0 200 OK
Server: KoboldCppServer 1
Date: Mon, 21 Sep 2026 08:43:32 GMT
content-length: 6710
access-control-allow-origin: *
access-control-allow-methods: *
access-control-allow-headers: *,

The stack trace points to:

OpenAIProvider.parseJsonBody
OpenAIProvider.chatComplete
generateCharacterSchedule
schedule.service.js
Expected behavior

If schedule generation fails because the response is not valid JSON, the generation should stop and report the error.

There should be a retry limit/backoff rather than continuously retrying the same failed request.

Actual behavior

The schedule generation keeps retrying after the JSON parsing error, apparently without a limit, resulting in a very large number of repeated requests/errors.

I did not manually trigger the schedule generation or modify the schedule before this happened.

It may also be worth investigating why the OpenAI-compatible provider is receiving/parsing a response beginning with HTTP/1.0 200 OK as JSON when using KoboldCppServer.

<!-- gh-comment-id:5757790433 --> @scavru commented on GitHub (Sep 21, 2026): The schedule auto-generation seems to trigger by itself even though I did not manually regenerate or modify the schedule. When the generation fails because the LLM response cannot be parsed as valid JSON, the process appears to retry continuously, generating the same error over and over again. Relevant log: [schedule] ERROR for Linnea: OpenAI chatComplete() non-stream response: Failed to parse JSON response (Unexpected token 'H', "HTTP/1.0 2"... is not valid JSON). The response body starts with: HTTP/1.0 200 OK Server: KoboldCppServer 1 Date: Mon, 21 Sep 2026 08:43:32 GMT content-length: 6710 access-control-allow-origin: * access-control-allow-methods: * access-control-allow-headers: *, The stack trace points to: OpenAIProvider.parseJsonBody OpenAIProvider.chatComplete generateCharacterSchedule schedule.service.js Expected behavior If schedule generation fails because the response is not valid JSON, the generation should stop and report the error. There should be a retry limit/backoff rather than continuously retrying the same failed request. Actual behavior The schedule generation keeps retrying after the JSON parsing error, apparently without a limit, resulting in a very large number of repeated requests/errors. I did not manually trigger the schedule generation or modify the schedule before this happened. It may also be worth investigating why the OpenAI-compatible provider is receiving/parsing a response beginning with HTTP/1.0 200 OK as JSON when using KoboldCppServer.
Author
Owner

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

I am taking this in #6482 for @SpicyMarinara. The sweep will reuse the existing schedule and UI paths and include focused regression checks.

<!-- gh-comment-id:5758021845 --> @SpicyMarinara commented on GitHub (Sep 21, 2026): I am taking this in #6482 for @SpicyMarinara. The sweep will reuse the existing schedule and UI paths and include focused regression checks.
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#3631
No description provided.