You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message is identical: messages.X: all messages must have non-empty content except for the optional final assistant message, though the root causes may differ (network interruption vs. message handling).
Feel free to ignore if this doesn't address your specific network interruption case.
I think there was a rare condition where an llm request started, didn't generate anything yet, and then connection was dropped but we saved the data. we should filter / drop these messages probably to prevent this issue...
To fix this in meantime you should be able to do a /undo (1 or more times) and that will remove broken message from context
I think there was a rare condition where an llm request started, didn't generate anything yet, and then connection was dropped but we saved the data. we should filter / drop these messages probably to prevent this issue...
To fix this in meantime you should be able to do a /undo (1 or more times) and that will remove broken message from context
Running /undo was actually exactly what I did several times and still got the same error which was why I created this issue
I have the same, without network interruption. Usually happens when context go very large (>160k). But with compact command it always happen so basically I can't compact the session.
The second problem is, UI not handles this response and simply stuck at Generating... forever.
INFO 2025-10-13T07:09:33 +0ms service=bus type=message.updated publishing
INFO 2025-10-13T07:09:33 +1ms service=bus type=message.updated publishing
INFO 2025-10-13T07:09:33 +0ms service=bus type=message.updated publishing
INFO 2025-10-13T07:09:33 +59ms service=bus type=session.updated publishing
INFO 2025-10-13T07:09:33 +70ms service=bus type=message.updated publishing
INFO 2025-10-13T07:09:33 +245ms service=bus type=session.updated publishing
INFO 2025-10-13T07:09:33 +0ms service=session.prompt session=ses_6262b2e92ffe6KbDw8jZSvliwT sessionID=ses_6262b2e92ffe6KbDw8jZSvliwT unlocking
ERROR 2025-10-13T07:09:33 +0ms service=server error=messages.123: all messages must have non-empty content except for the optional final assistant message failed
INFO 2025-10-13T07:09:33 +0ms service=server duration=26438 response
INFO 2025-10-13T07:09:33 +0ms service=bus type=session.idle publishing
ERROR 2025-10-13T07:09:33 +1ms service=tui failed to send message: POST "http://127.0.0.1:58411/session/ses_6262b2e92ffe6KbDw8jZSvliwT/message": 400 Bad Request {"name":"UnknownError","data":{"message":"AI_APICallError: messages.123: all messages must have non-empty content except for the optional final assistant message"}}
INFO 2025-10-13T07:11:53 +139200ms service=server method=POST path=/session/ses_6262b2e92ffe6KbDw8jZSvliwT/abort request
INFO 2025-10-13T07:11:53 +1ms service=server duration=1 response
INFO 2025-10-13T07:11:55 +1920ms service=tui offset=14404 x=78 y=34 mouse
INFO 2025-10-13T07:11:55 +0ms service=tui end=-1,-1 start=78,14438 mouse selection
INFO 2025-10-13T07:11:56 +1199ms service=server method=POST path=/session/ses_6262b2e92ffe6KbDw8jZSvliwT/abort request
INFO 2025-10-13T07:11:56 +0ms service=server duration=0 response
INFO 2025-10-13T07:11:58 +2364ms service=server method=POST path=/session/ses_6262b2e92ffe6KbDw8jZSvliwT/summarize request
INFO 2025-10-13T07:11:58 +2ms service=bus type=session.updated publishing
INFO 2025-10-13T07:11:58 +307ms service=bus type=message.updated publishing
INFO 2025-10-13T07:11:59 +371ms service=bus type=session.updated publishing
ERROR 2025-10-13T07:11:59 +0ms service=server error=messages.123: all messages must have non-empty content except for the optional final assistant message failed
INFO 2025-10-13T07:11:59 +0ms service=server duration=680 response
ERROR 2025-10-13T07:11:59 +0ms service=tui error=POST "http://127.0.0.1:58411/session/ses_6262b2e92ffe6KbDw8jZSvliwT/summarize": 400 Bad Request {"name":"UnknownError","data":{"message":"AI_APICallError: messages.123: all messages must have non-empty content except for the optional final assistant message"}} Failed to compact session
Reproduced on v1.1.53 — Plan mode, Claude Opus 4.6, max variant. Aborting during thinking (before any text output) in a long session causes messages.X: all messages must have non-empty content on the next message. I have a fix in mind — can I submit a PR?
Activity
github-actions commentedon Oct 11, 2025
This issue might be a duplicate of existing issues. Please check:
The error message is identical:
messages.X: all messages must have non-empty content except for the optional final assistant message, though the root causes may differ (network interruption vs. message handling).Feel free to ignore if this doesn't address your specific network interruption case.
rekram1-node commentedon Oct 11, 2025
I think there was a rare condition where an llm request started, didn't generate anything yet, and then connection was dropped but we saved the data. we should filter / drop these messages probably to prevent this issue...
To fix this in meantime you should be able to do a /undo (1 or more times) and that will remove broken message from context
bma-d commentedon Oct 11, 2025
Running /undo was actually exactly what I did several times and still got the same error which was why I created this issue
rekram1-node commentedon Oct 11, 2025
hmm any chance u can share session?
westito commentedon Oct 13, 2025
I have the same, without network interruption. Usually happens when context go very large (>160k). But with
compactcommand it always happen so basically I can't compact the session.The second problem is, UI not handles this response and simply stuck at
Generating...forever.westito commentedon Oct 13, 2025
Export:
conversation-1180351177.md
As I see export not contains the end of conversation
bma-d commentedon Oct 21, 2025
That's probably exactly what's happening, the last part is not being tracked haha
bma-d commentedon Oct 21, 2025
I couldn't find it and I think the above session not having the details was exactly why
rekram1-node commentedon Oct 21, 2025
I think this should be an easy fix, I know what we need to do: drop the empty text parts, may need to just filter them out will look at it
ujjwaljainnn commentedon Feb 10, 2026
Reproduced on v1.1.53 — Plan mode, Claude Opus 4.6, max variant. Aborting during thinking (before any text output) in a long session causes messages.X: all messages must have non-empty content on the next message. I have a fix in mind — can I submit a PR?
github-actions commentedon Apr 12, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.