This repository was archived by the owner on Aug 24, 2026. It is now read-only.
Repository navigation
fix: improve Fusion behavior on OpenCode 1.18.21 - #54
Merged
Merged
Conversation
The main agent's largest avoidable context cost is git read output, not the commit and push calls: a whole-repo diff or a `git log -p` sweep lands in the heavy model's context and stays there for the session. Route history digging to sidekick, which has full bash where explore carries whatever read-only policy the installed opencode ships, and have the main agent stat before it diffs. Refs #53
Review of PR #54 found the routing change rested on a false premise. opencode 1.18.21 defines the built-in explore with bash "allow" (verified by extracting the agent definition from the binary), so explore can run git. Routing history digs to sidekick sent read-only work to an edit-capable agent on the pricier model. - Route git history investigation to explore, not sidekick. This also drops the conflict with the five-part Spec contract, which a `git blame` question cannot satisfy, and with sidekick's REPORT FORMAT, which has no field for an investigation that modifies nothing. - Deny patch-producing `git log` forms (-p, -u, --patch) in the build and plan allowlists. AGENTS.md requires a mechanical half, not prompt wording alone. - Apply the git-output rule to plan.md, which carries the same git allowlist on the same model and was missed. - Use `git diff HEAD` throughout: a bare `git diff` reads empty once an executor has staged its work. Steps 6 and 9 said plain `git diff`, contradicting the new rule in the same prompt. - Move the task_id instruction to its own step. opencode surfaces an id only in `Subagent failed (task_id: ...)`, never on a returned-but-wrong diff, so it was inert where it sat. Name the mechanism (the task tool's task_id argument) and the silent-fresh-session fallback. - Pin all of the above with contract tests, and assert no role other than design grants the skill permission. - Document design's `skill: allow` in the README threat model: it skips the per-use prompt and overrides a global skill deny.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
exploreagent and keep main-agent diff review scopedtask_idskilltool available under a global skill denyTesting
npm test— 189 passed, 0 failed, 2 skippednpm run test:integration— 5 passed with OpenCode 1.18.21npm run check-profiles— 5 profiles, 0 errors, 0 warningsnpm run check-install— repository prompts matched the installed copies by contentedittool; OpenCode 2 is not supported by the final maintained release