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
{{ message }}
Repository navigation
tui: plan-mode system reminders rendered as visible transcript blocks #55397
The screenshot suggests something different from what the title says. The TUI shows the plan-mode reminder as a single short "Notice" row and never prints its full text. The [Synthetic context]: … / [User]: … lines in your screenshot are a transcript format OpenCode only uses internally when it compacts (summarizes) a session. Here they appear inside the assistant's reply, followed by [User]: 怎么知道我是不是最新版本 and User asks: …. So it looks like the model wrote this text, possibly after a compaction, rather than the TUI showing hidden messages.
To look into this, could you tell us:
The provider and model you were using in that session (e.g. anthropic/claude-…, openai/gpt-…).
Whether the session had been compacted before this reply, either automatically or with /compact. A compaction entry would show up earlier in the transcript.
In your own words, briefly: what did you send just before this happened, and does it happen in a new, short plan-mode session too, or only in long ones?
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
Related issues, ordered by likelihood of being relevant:
Follow-up with the requested details and a fresh test:
1. Provider/model: volcengine-agent-plan / ark-code-latest (Volcengine Ark,
a third-party provider — not anthropic/openai).
2. Yes, the session had been compacted before the leaking reply. Evidence:
after compaction, the model's context contains a
<conversation-checkpoint> block whose "recent-context" section serializes
earlier turns in exactly the [Synthetic context]: … / [User]: … /
[Assistant]: … transcript format. Those labeled lines were literally
present in the model's input right before the reply that echoed them.
3. Just before it happened, I sent the same short question 2–3 times in
quick succession. It was a very long, multi-day session.
4. Fresh short-session test: opened a brand-new session, stayed in Plan
mode, sent several messages including multi-turn Q&A. The English blocks
did NOT appear. So this only happens in long sessions after compaction —
consistent with your hypothesis that the model echoes the internal
transcript format it was fed during compaction, rather than the TUI
revealing hidden messages.
Likely root cause: the compaction record fed back to the model includes the
labeled transcript lines verbatim, and this particular model
(volcengine-agent-plan / ark-code-latest) does not treat them as strictly
internal, so it may quote them into its visible reply.
------------------ 原始邮件 ------------------
发件人: "anomalyco/opencode" ***@***.***>;
发送时间: 2026年10月14日(星期三) 晚上8:57
***@***.***>;
***@***.******@***.***>;
主题: Re: [anomalyco/opencode] tui: plan-mode system reminders rendered as visible transcript blocks (Issue #55397)
opencode-agent[bot] left a comment (anomalyco/opencode#55397)
Thanks for the report and the screenshot!
The screenshot suggests something different from what the title says. The TUI shows the plan-mode reminder as a single short "Notice" row and never prints its full text. The [Synthetic context]: … / [User]: … lines in your screenshot are a transcript format OpenCode only uses internally when it compacts (summarizes) a session. Here they appear inside the assistant's reply, followed by [User]: 怎么知道我是不是最新版本 and User asks: …. So it looks like the model wrote this text, possibly after a compaction, rather than the TUI showing hidden messages.
To look into this, could you tell us:
The provider and model you were using in that session (e.g. anthropic/claude-…, openai/gpt-…).
Whether the session had been compacted before this reply, either automatically or with /compact. A compaction entry would show up earlier in the transcript.
In your own words, briefly: what did you send just before this happened, and does it happen in a new, short plan-mode session too, or only in long ones?
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
Related issues, ordered by likelihood of being relevant:
#54140: the plan-mode reminder can be stored several times, once per leftover plugin instance after config reloads. This may explain why there are three identical blocks.
#43247: compaction runs without a system prompt, one possible way the internal transcript format ends up in the model's context.
#42238: opencode run --format json shows auto-compaction internals as ordinary text.
#20148: an older report of internal system tags leaking into assistant output.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
You're right about the cause. After a compaction, OpenCode starts the model's context with a <conversation-checkpoint> message. Its <recent-context> part holds the most recent turns as plain text, with labels like [User]:, [Assistant]: and [Synthetic context]:. Some models copy that format into their own replies, and that's what your screenshot shows: ark-code-latest reproducing the plan-mode reminder and your question. That fits it appearing only in a long, compacted session and not in a fresh one. There is already a note in the code saying the recent history shouldn't be passed as text because it confuses some models.
I think this is a duplicate of #50814. It has the same cause; there the model copies the [Assistant tool call]: … lines from the same checkpoint instead of making real tool calls. Possible duplicates and related issues, ordered by likelihood:
Closing this as a duplicate of #50814, since there was no reply to the duplicate notice. Both have the same cause: after a compaction, the model copies the plain-text recent history from the <conversation-checkpoint> into its own reply. Please follow #50814 for updates; #54140 may also explain why the reminder appeared three times.
Thanks again for the detailed follow-up, @yao8568. If this turns out to be different from #50814, for example it happens without a compaction or with another model, reply here and we can reopen it.
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the report and the screenshot!
The screenshot suggests something different from what the title says. The TUI shows the plan-mode reminder as a single short "Notice" row and never prints its full text. The
[Synthetic context]: …/[User]: …lines in your screenshot are a transcript format OpenCode only uses internally when it compacts (summarizes) a session. Here they appear inside the assistant's reply, followed by[User]: 怎么知道我是不是最新版本andUser asks: …. So it looks like the model wrote this text, possibly after a compaction, rather than the TUI showing hidden messages.To look into this, could you tell us:
anthropic/claude-…,openai/gpt-…)./compact. A compaction entry would show up earlier in the transcript.You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
Related issues, ordered by likelihood of being relevant:
opencode run --format jsonshows auto-compaction internals as ordinary text.yao8568 commentedon Oct 15, 2026
opencode-agent commentedon Oct 15, 2026
Thanks for testing this. The details settle it.
You're right about the cause. After a compaction, OpenCode starts the model's context with a
<conversation-checkpoint>message. Its<recent-context>part holds the most recent turns as plain text, with labels like[User]:,[Assistant]:and[Synthetic context]:. Some models copy that format into their own replies, and that's what your screenshot shows:ark-code-latestreproducing the plan-mode reminder and your question. That fits it appearing only in a long, compacted session and not in a fresh one. There is already a note in the code saying the recent history shouldn't be passed as text because it confuses some models.I think this is a duplicate of #50814. It has the same cause; there the model copies the
[Assistant tool call]: …lines from the same checkpoint instead of making real tool calls. Possible duplicates and related issues, ordered by likelihood:In the meantime, starting a new session, or keeping long sessions short enough to avoid compaction, should avoid this with this model.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 16, 2026
Closing this as a duplicate of #50814, since there was no reply to the duplicate notice. Both have the same cause: after a compaction, the model copies the plain-text recent history from the
<conversation-checkpoint>into its own reply. Please follow #50814 for updates; #54140 may also explain why the reminder appeared three times.Thanks again for the detailed follow-up, @yao8568. If this turns out to be different from #50814, for example it happens without a compaction or with another model, reply here and we can reopen it.