Skip to content

Devin CLI + opencode CLI as worker backends#3

Merged
copeus merged 4 commits into
mainfrom
devin-opencode-backends
Jul 13, 2026
Merged

Devin CLI + opencode CLI as worker backends#3
copeus merged 4 commits into
mainfrom
devin-opencode-backends

Conversation

@copeus

@copeus copeus commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Adds Devin and opencode as opt-in, lower-trust, WORKER-ONLY headless backends (excluded from the arbiter panel — multi-provider family ≠ fixed backend family).

  • resolve-model.py + validate-manifest.py: both registered (tier→model maps; opencode multi-provider provider/model; xhigh stays codex-only; no-Haiku intact).
  • Worker scripts mirror the codex/cursor template (worktree-at-HEAD, timeout supervisor </dev/null, git-derived scope gate, job_result in $ART). opencode env-scrub is live-proven (leak-canary) — it can't borrow the dispatcher's provider creds (it authed with zero creds via inherited ANTHROPIC_BASE_URL).
  • Devin -p run VERIFIED LIVE with an authenticated account (exit 0, bare-text stdout; a retryable transient-capacity error class; cwd-reset noted). Devin session-id + rich failure-classifier are auth-pending (safe defaults).
  • Both CLIs installed locally and kept.

Codex-reviewed (cross-model). Selftests + bash-n + shellcheck green.

🤖 Generated with Claude Code

copeus and others added 4 commits July 13, 2026 10:40
Adds devin + opencode to resolve-model.py (backend enum + tier->model maps;
opencode uses provider/model strings, multi-provider) and validate-manifest.py
VALID_BACKENDS + worktree-required set. New adapter-devin.md (Devin -p headless,
--permission-mode dangerous; Devin -p run VERIFIED LIVE with an authenticated
account: exit 0, bare-text stdout, a retryable transient-capacity error class,
cwd-reset noted) + adapter-opencode.md (opencode run --format json, multi-
provider, MANDATORY env-scrub — opencode authed with zero creds via inherited
ANTHROPIC_BASE_URL). Both LOWER-TRUST, opt-in, WORKER-ONLY (excluded from the
arbiter panel — multi-provider family != fixed backend family). xhigh stays
codex-only; no-Haiku respected; no fabricated metrics.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mirror the codex/cursor worker template: worktree-at-HEAD (caller owns git
base), timeout supervisor with </dev/null + bounded output, job_result in $ART
(not $WT — avoids a false scope-gate BLOCKED), git-derived scope gate via
compound-v-scope-check.py (never self-reported). opencode worker does a
VERIFIED-live env-scrub (env -u ANTHROPIC_*/OPENAI_* — leak-canary proven) so it
can't borrow the dispatcher's provider creds, + a restrictive opencode.json.
Devin session-id/rich-failure-classification marked auth-pending (safe default:
empty session, 'other' class; empty-stdout-on-exit-0 -> error). bash -n +
shellcheck clean; E2E verified with inert stand-ins (success/BLOCKED/timeout).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
HIGH: validator now REJECTS a reviewer job on backend devin/opencode
(worker-only enforced, not just documented); opencode.json backup/restore is
symlink-safe + exit-trap-guarded (no write outside the worktree); opencode
false-success closed (exit 0 with zero valid JSONL events / no final text ->
error). MED: env-scrub is now an env -i ALLOWLIST (leak-canary proven vs
ANTHROPIC_BASE_URL/API_KEY + OPENCODE_API_KEY); opencode provider/model shape
enforced in resolver + validator; '--' terminator before the opencode prompt
(live-verified leading-dash prompts); Devin --export dropped (was outside the
byte cap); glob-safe WRITE_ALLOWED split (set -f). Selftests + bash-n +
shellcheck green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n-string model)

opencode.json BACKUP artifact is now symlink-safe: private artifact dir
validated non-symlink, backup path must not pre-exist (rm -f before cp), and
restore refuses a symlink/tampered backup (fail-closed -> scope gate BLOCKS
rather than reading attacker-redirected content). Validator now rejects a
NON-STRING opencode model (42/list/dict) that previously bypassed the
provider/model shape check. Live-proven (mid-run symlink swap -> blocked) +
3 negative selftests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@copeus
copeus merged commit 280ca13 into main Jul 13, 2026
1 check passed
copeus added a commit that referenced this pull request Jul 13, 2026
…; usage-object conformance; advisor_calls derived

Codex findings #1(BLOCKER),#2,#3,#4: empty/string/negative usage no longer becomes measured:true 0/0;
aggregate emits null (not real 0) when nothing measured; advisor_calls aggregates independent of
token-measured; collect-results deep-validates the usage object + derives advisor_calls from the
per-job advisor log (<run-dir>/logs/<job-id>.advisor.jsonl).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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