Description
When a user sends a follow-up message while the assistant is still running, OpenCode wraps that queued message in a temporary block before sending the next request to the model.
That wrapper is only applied for that in-flight turn. It is not preserved as part of the message’s stable history. On later turns, the same message is sent back to the model in its original unwrapped form.
As a result, the exact same historical user message is serialized differently across requests:
- when first consumed from the queue: wrapped in
<system-reminder>
- on later turns: original text
This breaks prompt caching, since the prompt prefix is no longer stable across turns even though the underlying conversation history has not meaningfully changed.
The original user-visible message text should remain unchanged in the UI, but the model-facing representation of queued messages should be stable across future turns.
Plugins
None
OpenCode version
1.4.0
Steps to reproduce
- Start a session and send a prompt that keeps the model busy long enough to submit another message before the first run finishes.
- While that run is still in progress, send a second user message.
- Let OpenCode continue and consume that queued message.
- Send a third message after the queued message has already been processed.
- Inspect the model inputs for:
- the request that first consumes the queued message
- the later request that includes that same message as conversation history
- Notice that the queued message is wrapped with a
<system-reminder> in the first request, but appears as original text in the later request.
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal
Description
When a user sends a follow-up message while the assistant is still running, OpenCode wraps that queued message in a temporary block before sending the next request to the model.
That wrapper is only applied for that in-flight turn. It is not preserved as part of the message’s stable history. On later turns, the same message is sent back to the model in its original unwrapped form.
As a result, the exact same historical user message is serialized differently across requests:
<system-reminder>This breaks prompt caching, since the prompt prefix is no longer stable across turns even though the underlying conversation history has not meaningfully changed.
The original user-visible message text should remain unchanged in the UI, but the model-facing representation of queued messages should be stable across future turns.
Plugins
None
OpenCode version
1.4.0
Steps to reproduce
<system-reminder>in the first request, but appears as original text in the later request.Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal