feat(clis): add opencode Auto variant (opencode --auto) - #3
Open
DerRemo wants to merge 1 commit into
Open
Conversation
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
Deploying with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstream-monitoring routine found one actionable change: opencode 1.17.12 introduced a public, TUI-level
--autoflag — "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-permissionswasrun-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 variantopencode --auto(tierauto) alongside the existingStandard. BecausedefaultVariant()prefers theautotier, opencode's default spawn now lands on Auto, matching claude/codex behaviour. Updated the registry comment.--yolo/--dangerously-skip-permissions) is a hidden opencode flag and is deliberately not offered — nodangertier is added.public/clis.test.js— updated the opencode variant assertions anddefaultVariant/variantByTierexpectations. 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.--autoand--continue/-cconfirmed as public flags in opencode's TUI command builder (packages/opencode/src/cli/cmd/tui.ts); the existingcontinueCommand('opencode')→opencode --continuepath remains correct.Monitoring notes (no action needed)
claude --permission-mode autovariant is unaffected; the plainclaude"Standard" variant simply inherits the new manual default — no code change required.--sandbox …/--dangerously-bypass-approvals-and-sandboxflags changed since the 0.135 baseline.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