GeezerVison is showing github.com — bug: control user messages are treated as real user history · Issue #19319 · anomalyco/opencode
bug: control user messages are treated as real user history #19319
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff) Description
Description
Control turns that OpenCode stores as role: "user" can still be treated as real user input by history readers.
Concrete cases I hit:
- Revert anchoring: after a normal user message, if OpenCode creates a control user turn (for example a compaction message or a synthetic "Continue if you have next steps..." turn), reverting from that selected message can anchor the revert to the control message instead of the previous real user request.
- Prompt / model / agent recovery: subtask-only and compaction-only user turns can become the "last user" for logic that restores the current model or agent, even though no human typed a new prompt.
- Share model sync: share sync can publish model metadata for a compaction control turn, which makes the shared session look like a human turn changed the model when it was only an internal control message.
Expected behavior: only user turns that contain real user input should count as "real user history" for these readers.
Actual behavior: some history readers only check role === "user", so synthetic/control turns are treated as fresh user intent.
Plugins
None
OpenCode version
1.3.2
Steps to reproduce
- Start a session and send a normal user message such as
hello.
- Create a control user turn after it. One concrete way is to trigger compaction so OpenCode creates a user message whose only part is
type: "compaction". Another is a synthetic continuation user turn whose text is Continue if you have next steps....
- Trigger a path that reads back the latest or previous user turn.
- Example A: revert from the selected control message.
- Example B: run logic that restores the current model / agent from the latest user message.
- Example C: share the session and let incremental sync process the control turn.
- Observe that the control turn is treated as if it were real user input.
Screenshot and/or share link
N/A
Operating System
Ubuntu 24.04
Terminal
Ghostty
Activity
added
coreAnything pertaining to core functionality of the application (opencode server stuff) on Mar 26, 2026rich-jojo commented on Apr 24, 2026
Closing because I am no longer tracking or upstreaming my own backlog in non-owned repos.
Metadata
Metadata
coreAnything pertaining to core functionality of the application (opencode server stuff) Development
No branches or pull requestsIssue actions