Skip to content

old messages disappear #7380

Closed as not planned
Closed as not planned

Description

@JoshuaDietz

Description

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)

Screenshot and/or share link

No response

Operating System

NixOS 25.11

Terminal

Kitty

Activity

  1. github-actions commented on Jan 8, 2026

    @github-actions
    Contributor

    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.

  2. github-actions commented on Mar 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  3. removed
    bugSomething isn't working
    on May 3, 2026
  4. vpetrigo commented on May 7, 2026

    @vpetrigo

    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;
    
  5. vpetrigo commented on May 13, 2026

    @vpetrigo

    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.

  6. mewa commented on Jun 12, 2026

    @mewa

    @rekram1-node This is pretty much still an issue – messages are truncated in TUI, but not when viewing the same session via opencode web

  7. BarnoTD commented on Jun 15, 2026

    @BarnoTD

    @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.

  8. vpetrigo commented on Jun 15, 2026

    @vpetrigo

    @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.

  9. BarnoTD commented on Jun 17, 2026

    @BarnoTD

    @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.

  10. vpetrigo commented on Jun 18, 2026

    @vpetrigo

    @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.

  11. vpetrigo commented on Jun 22, 2026

    @vpetrigo

    @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.

  12. AliFlux commented on Sep 22, 2026

    @AliFlux

    Same issue here. Opencode eats out the older conversation which makes it difficult to see what went wrong

  13. Nowaker commented on Oct 8, 2026

    @Nowaker

    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.

  14. vpetrigo commented on Oct 9, 2026

    @vpetrigo

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions