Skip to content

feat: opencode go bulk lane through the codex cli sandbox (0.0.90) - #122

Merged
okisdev merged 8 commits into
mainfrom
opencode-bulk-lane
Nov 22, 2026
Merged

okisdev merged 8 commits into
mainfrom
opencode-bulk-lane

Conversation

@okisdev

@okisdev okisdev commented Nov 22, 2026

Copy link
Copy Markdown
Owner

summary

  • new opencode plugin: a bulk lane on the OpenCode Go subscription for high volume generation that a verification command accepts (curriculum files, fixtures, translations), so that work stops spending Codex quota. roles are bulk (writes in an orchestrator owned worktree) and read only blind-check (answers a staged artifact with its answers removed, on another family). spec in docs/opencode-contract.md
  • the companion drives the Codex CLI against the Go API from a private CODEX_HOME, so writes stay confined by the workspace-write sandbox while its health, opencode pool, and rollouts never touch the Codex engine. it generates the Codex model catalog from codex debug models --bundled (fallback metadata caps context at 272000 tokens and truncates tool output at 10 KB, which looped on compaction and wrote nothing) and excludes OPENCODE_* from tool subprocesses (Codex passes its full env to them by default)
  • routing gets one bulk generation row plus peer role lines; opencode never sits on a review, panel, or independence seat, never satisfies no-healthy-lane, and every rule sentence that names it is conditioned on it being installed
  • the Codex exec stack moves to shared/companion byte identical (plugins/codex copies unchanged), and engine binaries plus their override envs move into the registry so the breaker cli check stops inferring a binary from the id. reviewable logic is in plugins/opencode/scripts/opencode-companion.mjs, scripts/lib/opencode-home.mjs, scripts/lib/opencode-provider.mjs, plugins/fusion/scripts/lib/engines.mjs, and the rules; the rest of plugins/opencode/scripts/lib is vendored by shared/sync.mjs

test plan

already verified

  • node shared/sync.mjs --check passes and git diff origin/main -- plugins/codex/scripts is empty
  • claude plugin validate passes for all seven plugins and the marketplace root
  • npm test: 3180 tests, 3176 pass, 3 skipped, 1 fail; the failure is tests/codex-quota.test.mjs "a live account rate limit read needs Codex credentials", a timing flake under load that passes 10 of 10 alone and touches no changed code
  • live against a real Go key: /opencode:setup ready, quota --json maps rolling 4%, weekly 1%, monthly 0%, models --json lists 31 tool capable models, the generated catalog has a 1M window and 10000 token truncation
  • live bulk run in a scratch repo: wrote the file inside the workspace, env | grep -c OPENCODE_GO printed 0, a touch outside the workspace failed with Operation not permitted, the verification command passed, and the rollout landed in the private home rather than ~/.codex
  • pilots before the plugin existed: Codex CLI on Go DeepSeek Flash wrote a full curriculum unit in 9 minutes for about $0.10 to $0.19 of the allowance; a GLM blind check of 59 questions cost $0.0036 and caught one wrong key

reviewer should verify

  • with OPENCODE_GO_API_KEY set, /opencode:setup reports ready and /fusion:smoke runs six probes; without the plugin it still runs five
  • a /opencode:task brief with opencode-role: bulk and a verification command writes only inside its worktree

notes

  • the live usage endpoint's percent is read as a share of each window; whether rolling and weekly are shares of their caps or of the monthly allowance is unconfirmed upstream
  • setup advises turning Extra Usage off in the OpenCode console, because with it on the pool silently bills a pay as you go balance

the seven codex-*.mjs modules move to shared/companion unchanged so a second companion can drive the codex cli; the codex plugin copies stay byte identical.
drives the codex cli against the opencode go api from a private CODEX_HOME, generates its model catalog from codex debug models --bundled, keeps OPENCODE_* out of tool subprocesses, and reports the rolling, weekly, and monthly go windows as the included opencode pool. roles are bulk (workspace-write) and read only blind-check.
adds the opencode registry entry, lane defaults, and capability rows; engine binaries and their override variables move into the registry so the breaker cli check stops inferring a binary from the engine id; bulk never satisfies no-healthy-lane.
one routing row and peer roles for opencode bulk and blind-check, troubleshooting guardrails, and config, doctor, setup, and smoke coverage, with the smoke probe only when the plugin is installed.
@okisdev
okisdev merged commit 4a45115 into main Nov 22, 2026
4 checks passed
@okisdev
okisdev deleted the opencode-bulk-lane branch November 22, 2026 10:21
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