You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a tight OpenCode adapter with run-scoped state isolation #662
Part of #653. Smithers already ships the OpenCode harness in its built-in registry, and the OpenCode + OpenRouter pairing has already driven a full ultrafuzz run at ten concurrent agent seats with opaque catalogue model IDs, using nothing but the stock Smithers agent constructed with a model string, yolo mode, --pure and an output byte cap. The pairing is proven; the isolation is not.
Problem
That run wrote all of OpenCode's state into the operator's real home — config directory, database and write-ahead log, snapshots, tool output, cached model catalogue and downloaded binaries. No ultrafuzz run may write harness state outside a run-scoped root.
Scope
Add packages/runtime/src/templates/smithers/agents/opencode.tsx on the claude.tsx template (~90 lines):
Construct the Smithers OpenCode agent with the profile model and extraArgs: ["--pure"] (no external plugins).
Point every state root at a run-scoped directory through env: workflowControlChildEnvironment(...): the XDG config/data/cache/state roots plus OpenCode's own config-dir variable, and the suppressors for autoupdate, share, model-catalogue fetch, default plugins and project config.
Merge over the env the Smithers agent already sets for yolo mode rather than replacing it — replacing it silently disables permission bypass.
Read only auth / api_key_env / config_dir from [agents.OpenCodeAgent] via the shared TOML reader off ULTRAFUZZ_CONFIG_PATH.
Keep the subclass to the buildCommand env scrub.
Register in agentFactories and AGENT_TEMPLATES; add OpenCodeAgent: "opencode" to AGENT_EXECUTABLES in packages/runtime/src/doctor.ts with a version-pin assertion against the qualified version. Ship an opt-in [models.opencode] profile, non-default.
Acceptance criteria
Adapter is under ~100 lines and overrides only buildCommand.
Filesystem test: run a smoke prompt with the home directory pointed at a temporary root and assert nothing is created under OpenCode's default config, data or cache locations.
Unit test: the credential reaches the child env and never the argv.
Unit test: the agent's own yolo permission env survives the adapter's env merge.
ultrafuzz doctor requires the pinned OpenCode CLI.
Dependencies
None. The previous dependency on #659 is removed — the pairing needs no further qualification and the isolation work stands alone.
changed the title [-]Qualify OpenCode + OpenRouter with fully isolated state[/-][+]Add a tight OpenCode adapter with run-scoped state isolation[/+]on Aug 20, 2026
Closing as shipped: PR #696 ("tight OpenCode adapter with run-scoped state isolation") reached main via PR #744, and the release notes list the opt-in OpenCode adapter. Verified on main: agents/opencode.tsx, the doctor AGENT_EXECUTABLES OpenCodeAgent entry, and the [agents.OpenCodeAgent] config section (including the OPENCODE_DB-leak hardening, 459ae1d). Remaining polish is tracked in #701.
Activity
docs: separate provider, harness, and model for #653
docs: separate provider, harness, and model for #653
docs: number the gates and align the contract spelling for #653
docs: reconcile the OpenRouter default and page content map for #653
docs: correct the OpenCode reasoning surface and gate statuses for #653
docs: apply the page's own ownership rule to #661 and #662 for #653
docs: consolidate measurement ownership and restore issue parity for #…
docs: restore #664/#662/#659 acceptance parity and fix the ownership …
[-]Qualify OpenCode + OpenRouter with fully isolated state[/-][+]Add a tight OpenCode adapter with run-scoped state isolation[/+]fix(runtime): close the OPENCODE_DB leak and reject unreachable subsc…
Release/v0.1.0 (#744)
aviggiano commentedon Aug 24, 2026
Closing as shipped: PR #696 ("tight OpenCode adapter with run-scoped state isolation") reached main via PR #744, and the release notes list the opt-in OpenCode adapter. Verified on main:
agents/opencode.tsx, the doctorAGENT_EXECUTABLESOpenCodeAgent entry, and the[agents.OpenCodeAgent]config section (including the OPENCODE_DB-leak hardening, 459ae1d). Remaining polish is tracked in #701.