Repository navigation
fix(agent): make opencode v2 /acp status panel visible in the TUI - #880
Merged
ranxianglei merged 1 commit intoSep 17, 2026
Conversation
The /acp panel was carried only in the synthetic message's text. OpenCode V2's TUI renders a synthetic message as a Notice row only when its display text fits the timeline cap (~1KB; message-timeline.tsx canRenderImmediately), so real panels were silently dropped: users saw nothing after /acp. The panel now goes to description (verbatim under 1024 chars, leading lines + [panel truncated] above) and the model-facing body is an inert one-line note (V2_SYNTHETIC_TEXT) so the model context never repeats panel content. Verified live in a v2.0.4 TUI: short panels render fully as the notice row, a >1.5KB panel renders its leading lines plus the marker; no model turn is triggered (pairs with the no-wake fix #879).
ranxianglei
merged commit Sep 17, 2026
40c4970
into
2026-09-15_opencode-native-plugin
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #877
Problem
Under OpenCode V2 (
opencode >= 2, native plugin viav2.session.synthetic),/acpproduced no visible output in the TUI whenever the panel exceeded ~1 KB. Real panels are multi-line and box-drawn, so they routinely trip the cap. Short synthetic texts render fine, which masked the bug until live-testing with a full session.Root cause (official opencode v2.0.4 source,
packages/app/src/session/timeline/message-timeline.tsx,canRenderImmediately):A synthetic/notice row renders only when
(description ?? text)is ≤ 1024 chars; anything longer renders nothing (not even collapsed). The panel was carried intextonly.Fix
Carry the panel in
descriptioninstead (verbatim under 1024 chars; leading lines +[panel truncated]marker above —1004 + "\n\n[panel truncated]"= 1023 ≤ 1024), and set the model-facingtextto an inert one-liner (V2_SYNTHETIC_TEXT), so:Verification
[panel truncated]marker (see issue).synthetic({ sessionID, text, description, resume })is a supported API shape — the opencode v2 SDK postsdescriptionto/api/session/:id/syntheticand the Synthetic message schema carries optionaltext/description.description.length ≤ 1024ending in[panel truncated],text= the inert one-liner.npm run typecheckclean ·npm test1659 pass / 0 fail / 2 skipped ·npm run buildOK.Note: commit 304110a previously landed via #878 against the stale
2026-09-17_opencode-v2-acp-no-wakebranch. This PR carries the same single commit onto the real stack (base = #850's branch, where the no-wake fix already merged via #875). Diff vs base is exactly this one commit (3 files, +48/−7).