Repository navigation
feat(#862): opencode agent driver — fixture-proven NDJSON parser, skill-load gate, init/doctor/resume wiring - #1011
Merged
admarble merged 18 commits intoSep 8, 2026
Conversation
Entire-Checkpoint: 7e7567d6d815
…, AC-8) Entire-Checkpoint: cbd0be1c5ae9
…, AC-9) Entire-Checkpoint: 7ed84de67eeb
…loor (AC-7) Entire-Checkpoint: cd0d4a228d2f
…AC-5) Entire-Checkpoint: a3e04b39247c
… (AC-2) Entire-Checkpoint: d176f7673f7a
…surface Entire-Checkpoint: 77869baa8222
Entire-Checkpoint: dfb1ad81071b
Entire-Checkpoint: 7e7567d6d815
…, AC-8) Entire-Checkpoint: cbd0be1c5ae9
…, AC-9) Entire-Checkpoint: 7ed84de67eeb
…loor (AC-7) Entire-Checkpoint: cd0d4a228d2f
…AC-5) Entire-Checkpoint: a3e04b39247c
… (AC-2) Entire-Checkpoint: d176f7673f7a
…surface Entire-Checkpoint: 77869baa8222
Entire-Checkpoint: dfb1ad81071b
…e machine (AC-2) Opted in on a machine whose default OpenRouter model lacks tool use, the live smoke failed 404 at the provider before generating a token — a red tick that said nothing about this driver. OPENCODE_LIVE_MODEL pins a tool-capable model, and the assertion now surfaces PhaseResult.error instead of 'expected 0 to be greater than 0'. Verified live against opencode 1.18.27: 3 passed, real NDJSON, real resume handle. Entire-Checkpoint: 529a87e4e77c
Closed
9 tasks
admarble
deleted the
feature/862-feat-add-opencode-agent-driver-first-backend-that-
branch
September 8, 2026 06:10
6 tasks
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.
Summary
First non-Claude agent driver:
sequant run <n> --agent opencodedispatches every phase through a driver whose NDJSON parser was built against the recorded fixture from the #992 spike (src/lib/workflow/drivers/__fixtures__/opencode-run-qa.ndjson), never the README. Closes #862 (the P0 slice, graph-2026-09 node 12; P1 fidelity and the dogfood gate are #996 / #997).src/lib/workflow/drivers/opencode.ts(new) + one registry line: concatenatestextevents intooutput, mapserrorevents to a structured failure, and returnssuccessonly when the skill-load marker is present — a stream with no marker yields the distinctskill-not-loadederror (AC-4), not a parsed verdict.run.opencode: { model, variant, extraArgs, reasoningMaxTokens }settings seam, passed throughconfig-resolveruntouched;ExecutionConfiggainsopencodeSettingsand the producer-parity test asserts it (AC-9).opencode run --command <phase>load the sequant skill? (#862 P0 precondition, resolves OQ-8/OQ-9) #992 mitigations (AC-8): reasoning budget viaOPENCODE_CONFIG_CONTENT,detached: true, per-runXDG_CONFIG_HOME. No/tmpallow/deny rule is injected — the spike refuted that trap on 1.18.27 (OQ-19, accepted), and the AC-8 test asserts its absence.sequant init --agent opencodewrites.opencode/commands/<phase>.mdfor every phase entrypoint from a single template (AC-5);doctorchecks the binary and the pinned1.18.27floor (AC-7); resume handles round-trip and are rejected from a different cwd (AC-6).Provenance
The exec phase's first attempt was killed by the MCP launcher's 30-minute no-progress ceiling at 05:02Z and its worktree deleted; the committed work (8 commits) was pushed and the re-dispatch resumed on it. After QA the branch was rebased onto
main(post-#935), which diverged from the pushed lineage; rather than force-push,c7b30367is an-s oursmerge that makes the pushed lineage an ancestor with the tree unchanged. Squash on merge.Acceptance criteria — runner-verified at
c7b30367(tree identical to the QA'de60c7164rebased ontobdf32be6)npx vitest run src/lib/workflow/drivers/opencode.test.ts -t "862"opencode.live.integration.test.tsnode dist/bin/cli.js run 1 --agent opencode --dry-run(from an initialized checkout, afternpm run build);drivers/index.test.ts -t "862"Driver: opencodeper phase, no spawn; 3 passedopencode.test.ts -t "862 AC-4"skill-not-loadeddistinct error)init --agent opencodein a temp repo;grep -rl 'opencode/commands' src/commands/init.ts templates | wc -lresume-semantics.test.ts -t "opencode"doctor.test.ts -t "opencode"opencode.test.ts -t "862 AC-8"execution-config-parity.test.tsMutation verification (gate-test ACs)
Performed by the QA session on the QA'd commit
e60c7164(tree restored clean after each; the QA agent could not record them because no PR existed at the time), re-stated here as the record:Mutation-verified: AC-1 — emptied
__fixtures__/opencode-run-qa.ndjson;src/lib/workflow/drivers/opencode.test.tsfailed; restored.Mutation-verified: AC-2 —
skipReason()no longer returns the SKIPPED token;src/lib/workflow/drivers/opencode.live.integration.test.tsfailed; restored.Mutation-verified: AC-4 — disabled the
!parsed.skillLoadedguard inevaluateOpencodeRun;src/lib/workflow/drivers/opencode.test.tsfailed (2 tests); restored.QA
AC_MET_BUT_NOT_A_PLUS(iteration 1, commite60c7164). The single reason it was not READY_FOR_MERGE was the missing mutation record above, which this body supplies.🤖 Generated with Claude Code