docs: how to trim opencode under the Disengaged threshold, and where it has to happen - #11
Open
chrischall wants to merge 1 commit into
Open
docs: how to trim opencode under the Disengaged threshold, and where it has to happen#11chrischall wants to merge 1 commit into
chrischall wants to merge 1 commit into
Conversation
…it has to happen Follow-up to cramt#10, promoting the conclusive parts into the reference docs per AGENTS.md ("Where findings graduate to"). §9 says to keep the toolset lean and names opencode as the persistent-disengage case. Both are useful, but opencode gives a plugin no supported way to follow the advice — measured against 1.18.18, `config.tools`, `experimental.chat. system.transform` and `agent.<name>.prompt` are all accepted and then ignored by the outgoing request. The trim has to happen in the proxy, which is the one place that sees the final payload. That is the part worth recording, since it explains why the existing advice was not actionable for that harness. Also records what actually fills the payload (`<available_skills>` was 34,263 of 53,676 chars), the result of trimming (1,853 chars, 9 tools to 4), and two traps for anyone else attempting it: opencode injects AGENTS.md as prose rather than in a structured block, so a "keep only the tags" rule deletes the user's rules; and 1.18.18 renamed its editing tool to `apply_patch`. Flags one number for re-checking rather than silently changing it: opencode now offers 9 tools, not ~15, which is below the ~12 borderline this section states. Whether current opencode still disengages is a live-tenant question I could not answer, so the claim is left standing with a note rather than edited out. Everything added is scoped in a blockquote as measured against opencode, not against M365 — no live tenant was involved. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EHUSwu5rRUy1v78AA3LHC9
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.
Follow-up to #10 — you offered no preference, so here it is as the docs PR I said I'd
write. Happy to close it if you'd rather keep the issue and take none of this.
Promotes the conclusive parts into the reference docs per
AGENTS.md("Where findings graduate to"). Doc-only; no code touched.
Why this is worth a section
§9 says to keep the toolset lean and names opencode as the persistent-disengage case.
Both useful — but opencode gives a plugin no supported way to follow the advice.
Measured against 1.18.18:
config.toolsfrom a plugin'sconfighookopencode debug configshows it) and then ignored — a config disabling eight tools still produced a request offering all nineexperimental.chat.system.transformsystemarray, request still carries the original promptagent.<name>.promptfrom theconfighookSo the trim has to land in whatever sits between opencode and Sydney. That is the bit I
think is worth recording: it explains why the existing advice wasn't actionable for that
harness, rather than opencode simply being too heavy.
Also records what actually fills the payload —
<available_skills>was 34,263 of53,676 chars, an inventory of every skill on the machine, none of which the trimmed
toolset can invoke — and the result: 1,853 chars, 9 tools down to 4.
Plus two traps for anyone else attempting it:
AGENTS.md/global rules as prose under anInstructions from:line, not in a structured block, so a "keep only the
<tag>blocks" rule silentlydeletes the user's own project rules (I shipped that bug before catching it)
apply_patchwhere other versions shipedit/writeOne number I did not change
opencode 1.18.18 offers 9 tools, not ~15 — below the ~12 borderline §9 states. So on
tool count alone, current opencode may no longer be the persistent case described. I have
not verified that, so I left your claim standing and flagged it in the blockquote
rather than editing it out. Your call.
Scope
Everything added is fenced in a blockquote as measured against opencode, not against
M365 — no live tenant was involved, and I make no claim the threshold moved. If/when I
run it against a real tenant I'll report back on #10.
Context: this came out of writing an independent opencode plugin from your docs
(chrischall/opencode-copilot-plugin,
MIT, no code copied, credited in its README). Your write-ups were detailed enough to
implement the protocol from scratch, which is a rare thing — thank you.