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
I have a pretty long chat where I went on a sidequest for a bit. When scrolling up to see one of my old messages again, I noticed that it's not there anymore. The chat starts with a "Thinking" message from the assistant now. The missing message is also not visible using the "Jump to Message" feature, it seems like all messages before a certain point are just gone.
Are messages outside of the context window completely deleted? I'm actually pretty annoyed because the message that I'm searching is a long one with lots of important information which seems to be completely gone.
I've also tried if I can maybe use the "share" feature to see the message, but the feature actually does not seem to work at all, the page is loading for a while and then I just see an entirely black page.
Lastly, I also tried the "export" feature, there the chat is also starting with the same message as in the chat, same for the "copy" feature.
My suspicion is, that this is somehow connected to me switching models mid-chat. Is that possible? Or am I missing a concept here and messages are actually filtered by used model?
Plugins
No response
OpenCode version
Chat was done with 1.0.203, updated to 1.1.7 to see if this will bring the message back (it didn't)
Steps to reproduce
No idea, I'm not even sure if this is intended behavior (I hope it is not, purging messages without confirmation is a no-go in my opinion)
Based on your description, this appears to be related to message compaction, context window limits, or model switching causing messages to be permanently removed from the session history rather than just hidden from view. The fact that the messages don't appear in Jump to Message, share, export, or copy features suggests they've been removed from the session entirely.
Feel free to ignore if none of these address your specific case.
Messages are available in the DB though: if I open the opencode.db and execute the following query with the session_id set to a session ID where no old messages are shown, I can see all my old requests as well as old agent's responses:
SELECT * FROM part WHERE session_id = "<session_id>" ORDER BY time_created;
@rekram1-node I second @mewa . Conversation history is crucial for the user to re-check past message from LLM. User might want to check a previous explanation, an old plan or a previous prompt. These all are undoable right now because the session tends to hide older messages in the conversation.
@mewa@BarnoTD I would really appreciate if you find some time and verify if the changes are introduced in the #26861 works for you. 🙏 At least in that case we would have something we can ask for review from maintainers in order to get this fix as soon as possible.
@vpetrigo sure, but your pull request isn't merged and I use release version. I would appreciate if a few instructions for installing the commit were provided so I can verify with least problems. Thank you.
@BarnoTD yes, unfortunately, to verify the changes you have to deal with the dev build. :( There is a description on how to run the opencode via bun run or how to build a standalone executable with the script the dev team supplies.
@BarnoTD just for your information: I set up the test builds actions that use the PR's branch with the fix and the release version of the OpenCode project. For now there is only Win x64 and Linux x64 executables available.
For anyone still hitting this in the v1 TUI, I built a fix for my own use: #53660. Where messages are hidden it shows a divider with the count and actions to load them (/load-hidden), and transcript.max_messages in tui.json sets how many stay loaded.
v1 is maintenance-only, so it's there for anyone who wants it; a v2 version will follow.
@AliFlux please see the conversation above. I maintainf for now branches the v1 and v2 with messages pagination in long sessions. There are builds available for Win and Linux to give it a try.
I am not sure that #26861 would be ever merged, since it seems like the dev team does not have a capacity for issue/PR review not from the core team, but I would maintain that branch as long as I use OpenCode with test builds.
Activity
github-actions commentedon Jan 8, 2026
This issue might be a duplicate of or related to existing issues. Please check:
Based on your description, this appears to be related to message compaction, context window limits, or model switching causing messages to be permanently removed from the session history rather than just hidden from view. The fact that the messages don't appear in Jump to Message, share, export, or copy features suggests they've been removed from the session entirely.
Feel free to ignore if none of these address your specific case.
github-actions commentedon Mar 25, 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.
vpetrigo commentedon May 7, 2026
Messages are available in the DB though: if I open the
opencode.dband execute the following query with thesession_idset to a session ID where no old messages are shown, I can see all my old requests as well as old agent's responses:fix: increase compaction default tail_turns from 2 to 15
vpetrigo commentedon May 13, 2026
I prepared the PR #26861 to address that issue and I would be glad if someone else can check it on theirs end whether it works or not.
mewa commentedon Jun 12, 2026
@rekram1-node This is pretty much still an issue – messages are truncated in TUI, but not when viewing the same session via
opencode webBarnoTD commentedon Jun 15, 2026
@rekram1-node I second @mewa . Conversation history is crucial for the user to re-check past message from LLM. User might want to check a previous explanation, an old plan or a previous prompt. These all are undoable right now because the session tends to hide older messages in the conversation.
vpetrigo commentedon Jun 15, 2026
@mewa @BarnoTD I would really appreciate if you find some time and verify if the changes are introduced in the #26861 works for you. 🙏 At least in that case we would have something we can ask for review from maintainers in order to get this fix as soon as possible.
BarnoTD commentedon Jun 17, 2026
@vpetrigo sure, but your pull request isn't merged and I use release version. I would appreciate if a few instructions for installing the commit were provided so I can verify with least problems. Thank you.
vpetrigo commentedon Jun 18, 2026
@BarnoTD yes, unfortunately, to verify the changes you have to deal with the dev build. :( There is a description on how to run the
opencodeviabun runor how to build a standalone executable with the script the dev team supplies.vpetrigo commentedon Jun 22, 2026
@BarnoTD just for your information: I set up the test builds actions that use the PR's branch with the fix and the release version of the OpenCode project. For now there is only Win x64 and Linux x64 executables available.
AliFlux commentedon Sep 22, 2026
Same issue here. Opencode eats out the older conversation which makes it difficult to see what went wrong
Nowaker commentedon Oct 8, 2026
For anyone still hitting this in the v1 TUI, I built a fix for my own use: #53660. Where messages are hidden it shows a divider with the count and actions to load them (
/load-hidden), andtranscript.max_messagesintui.jsonsets how many stay loaded.v1 is maintenance-only, so it's there for anyone who wants it; a v2 version will follow.
vpetrigo commentedon Oct 9, 2026
@AliFlux please see the conversation above. I maintainf for now branches the v1 and v2 with messages pagination in long sessions. There are builds available for Win and Linux to give it a try.
I am not sure that #26861 would be ever merged, since it seems like the dev team does not have a capacity for issue/PR review not from the core team, but I would maintain that branch as long as I use OpenCode with test builds.