Skip to content

fix: refresh CLI agent adapters for upstream changes — Codex, OpenCode, Claude Code (v0.2.3)#8

Merged
weijt606 merged 2 commits into
mainfrom
v0.2.3
May 25, 2026
Merged

fix: refresh CLI agent adapters for upstream changes — Codex, OpenCode, Claude Code (v0.2.3)#8
weijt606 merged 2 commits into
mainfrom
v0.2.3

Conversation

@weijt606
Copy link
Copy Markdown
Owner

Summary

The supported agent CLIs have iterated quickly, and several adapters were
calling flags that no longer exist (or were missing flags now required). This
PR re-verifies every CLI adapter against the agents' current docs and fixes the
broken ones, plus refreshes the default model. Coupling is small by design — only
the thin adapter layer (build_command) and model defaults change; the core
engine and the api/openai/local backends are untouched.

Adapter changes

Backend Before After Why
Codex codex --quiet --auto-edit <p> codex exec --skip-git-repo-check --sandbox workspace-write <p>
Non-interactive mode is now codex exec; old flags removed upstream. --skip-git-repo-check because the workspace isn't
a git repo; --sandbox workspace-write lets it edit within the workspace.
OpenCode opencode -p <p> opencode run <p> Top-level -p is no longer supported upstream (the run
subcommand replaced it).
Claude Code claude -p <p> --output-format text --verbose `claude -p

--model claude-opus-4-7

--permission-mode acceptEdits --output-format text` Critical: recent Claude Code blocks file edits in headless -p
mode without --permission-mode acceptEdits, so the Proposer couldn't write harness.py. Also pins Opus 4.7 and
drops the now-noisy --verbose.

--permission-mode acceptEdits auto-approves Read/Edit/Write but still gates
arbitrary Bash/network — least-privilege, appropriate for the isolated workspace.

Verified unchanged

  • Hermes (hermes chat -q) and Claude Code -p / --output-format text confirmed current.
  • Claw Code left as-is (clean-room Claude clone, unverified, low usage; forcing an Anthropic model / new flags could
    break it — to be audited separately).

Other changes

  • Default Proposer model claude-sonnet-4-20250514claude-sonnet-4-6 (affects api/openai; CLI backends use their
    own model).
  • Docs (README / README_CN / technical-architecture) and CHANGELOG synced; version bumped to 0.2.3.

Testing

  • ruff check src/ tests/ — clean
  • pytest tests/206 passed
  • Adapter unit tests now assert the corrected invocations and guard against regressions (e.g. --quiet/-p/--verbose
    must NOT reappear; codex exec, opencode run, --permission-mode acceptEdits, --model claude-opus-4-7 must be
    present).

weijt606 added 2 commits May 26, 2026 01:22
…ault (v0.2.3)

CLI agents moved on; two adapters were calling removed flags:
- Codex: codex --quiet --auto-edit  →  codex exec --skip-git-repo-check --sandbox workspace-write
  (non-interactive is now 'codex exec'; old flags removed upstream; workspace isn't a git repo)
- OpenCode: opencode -p  →  opencode run  (top-level -p no longer supported upstream)

Verified claude-code (claude -p) and hermes (hermes chat -q) are still current;
claw-code mirrors Claude Code. Also bump default proposer model
claude-sonnet-4-20250514 → claude-sonnet-4-6 (api/openai backends). Docs +
CHANGELOG synced, version 0.2.3. 206 tests, lint clean.
Verified against current Claude Code (May 2026):
- Add --permission-mode acceptEdits — REQUIRED for the agent to write candidate
  files in headless -p mode; recent Claude Code blocks edits without it. Still
  gates arbitrary Bash/network (least-privilege for the isolated workspace).
- Pin --model claude-opus-4-7 (highest-capability Proposer).
- Drop --verbose (noise in print mode; not needed).
claude -p / --output-format text confirmed still current.
@weijt606 weijt606 merged commit 6784447 into main May 25, 2026
3 checks passed
@weijt606 weijt606 deleted the v0.2.3 branch May 25, 2026 23:40
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