Skip to content

feat(clis): add opencode Auto variant (opencode --auto) - #3

Open
DerRemo wants to merge 1 commit into
mainfrom
claude/determined-sagan-cgvlx9
Open

feat(clis): add opencode Auto variant (opencode --auto)#3
DerRemo wants to merge 1 commit into
mainfrom
claude/determined-sagan-cgvlx9

Conversation

@DerRemo

@DerRemo DerRemo commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Upstream-monitoring routine found one actionable change: opencode 1.17.12 introduced a public, TUI-level --auto flag — "auto-approve permissions that are not explicitly denied (dangerous!)". Penates's CLI registry (public/clis.js) still carried the note that opencode's TUI has no permission-bypass flag (--dangerously-skip-permissions was run-only), which is now outdated.

This PR wires opencode up to the same approval-tier model as the other CLIs.

Changes

  • public/clis.js — add an Auto variant opencode --auto (tier auto) alongside the existing Standard. Because defaultVariant() prefers the auto tier, opencode's default spawn now lands on Auto, matching claude/codex behaviour. Updated the registry comment.
  • The hard bypass (--yolo / --dangerously-skip-permissions) is a hidden opencode flag and is deliberately not offered — no danger tier is added.
  • public/clis.test.js — updated the opencode variant assertions and defaultVariant/variantByTier expectations. Relaxed the tier-ordering invariant from "last variant is danger" to "tiers ascend safe→auto→danger" (the real invariant), so a safe+auto CLI is valid.
  • tests/multi-cli.spec.js — opencode now shows 2 modus buttons; default = auto → opencode --auto.
  • CLAUDE.md — documented the new opencode variant in the Multi-CLI Spawn section.

Verification

  • node --test public/clis.test.js → 20/20 pass.
  • --auto and --continue/-c confirmed as public flags in opencode's TUI command builder (packages/opencode/src/cli/cmd/tui.ts); the existing continueCommand('opencode')opencode --continue path remains correct.

Monitoring notes (no action needed)

  • Claude Code 2.1.200 changed the default permission mode to Manual. Penates's claude --permission-mode auto variant is unaffected; the plain claude "Standard" variant simply inherits the new manual default — no code change required.
  • Codex is at 0.142.x; no evidence the --sandbox … / --dangerously-bypass-approvals-and-sandbox flags changed since the 0.135 baseline.
  • Antigravity agy --continue (used by session-restore) confirmed still valid (-c / --continue).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FVW9j95qMR6A8SaCwQUZCy


Generated by Claude Code

opencode 1.17.12 introduced a public TUI-level --auto flag
("auto-approve permissions that are not explicitly denied"), so the
registry note claiming opencode's TUI has no permission-bypass flag is
outdated. Add an Auto (tier 'auto') variant alongside the existing
Standard variant, which also makes defaultVariant('opencode') fall to
Auto — consistent with claude/codex. The hard bypass (--yolo /
--dangerously-skip-permissions) stays hidden and is deliberately not
offered, so no danger tier is added.

Relaxed the variant-ordering unit test from "last tier is danger" to
"tiers ascend safe→auto→danger", and updated the multi-cli E2E + docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FVW9j95qMR6A8SaCwQUZCy
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
penates d473fe6 Commit Preview URL

Branch Preview URL
Jul 04 2026, 12:14 AM

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.

2 participants