Skip to content

docs: how to trim opencode under the Disengaged threshold, and where it has to happen - #11

Open
chrischall wants to merge 1 commit into
cramt:mainfrom
chrischall:docs/opencode-harness-findings
Open

docs: how to trim opencode under the Disengaged threshold, and where it has to happen#11
chrischall wants to merge 1 commit into
cramt:mainfrom
chrischall:docs/opencode-harness-findings

Conversation

@chrischall

Copy link
Copy Markdown

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:

Lever What happens
config.tools from a plugin's config hook Resolved into the config (opencode debug config shows it) and then ignored — a config disabling eight tools still produced a request offering all nine
experimental.chat.system.transform Fires, accepts a replacement system array, request still carries the original prompt
agent.<name>.prompt from the config hook Ignored the same way

So 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 of
53,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:

  • opencode injects AGENTS.md/global rules as prose under an Instructions from:
    line, not in a structured block, so a "keep only the <tag> blocks" rule silently
    deletes the user's own project rules (I shipped that bug before catching it)
  • 1.18.18 ships apply_patch where other versions ship edit/write

One 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.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant