Repository navigation
One set of permission modes for every harness - #146
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
m4rocks
force-pushed
the
universal-permission-modes
branch
from
November 22, 2026 14:22
61ac411 to
2fa0d8b
Compare
m4rocks
force-pushed
the
universal-permission-modes
branch
from
November 22, 2026 14:39
2fa0d8b to
df32788
Compare
m4rocks
force-pushed
the
universal-permission-modes
branch
from
November 22, 2026 15:30
df32788 to
2e516dd
Compare
…he message box's text color Read-only, Ask, Auto and Full Access map to each adapter's own mode ids (harness/permission.rs). Pickers show the ones a harness has; a default it lacks starts the session in the nearest safer mode. The saved default is one universal value, and old saved ids load into it.
m4rocks
force-pushed
the
universal-permission-modes
branch
from
November 22, 2026 15:55
2e516dd to
78099ac
Compare
This branch was successfully deployed
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.
Each harness showed its own permission modes under its own names, and the saved default was a mode id that only meant something to one harness, so a new Codex or OpenCode session didn't start in the mode picked in Settings. In the message box, the permission chip's text was also grey while the model and branch chips are not.
Fix
harness/permission.rsdefines Read-only, Ask, Auto and Full Access, and the mode id each adapter uses for them:The chat picker and Shift+Tab only go through the modes the session's harness has. Claude's acceptEdits and dontAsk, and Antigravity's accept-edits, no longer appear in them. If a session ends up in one of those modes, the chip shows the harness's own name for it.
Settings stores a single default. A new session starts in that mode, or in the nearest safer one when its harness doesn't have it (OpenCode with Ask starts in plan). The same fallback runs again on the modes the live session lists, so an account without Claude's Auto gets Ask. Sessions started by another session still can't get Full Access; they now drop to Auto instead of the harness default.
Old saved defaults still load: manual and dontAsk become Ask, acceptEdits becomes Auto, plan becomes Read-only, bypassPermissions becomes Full Access, and the old per-harness
mode_idvalues map back to these too. If no default has been picked, the Settings row says "Harness default", and closing Settings no longer saves one.The mode chip's text now uses
theme::TEXT, the color the model and branch chips use.Evidence
cargo clippy --all-targetsis clean, andcargo testpasses (470), including new tests for the mapping, the safer fallback, the cycle and migration.Risk