Skip to content

feat(permissions): author Devin permission_mode through the devin override - #3816

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3413-devin-permission-mode
Nov 8, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3413-devin-permission-mode

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Devin CLI v3000.12.17 (2026-11-06) added permission_mode, the mode new local sessions start in. The config-file reference documents it as a user-only key with the values normal (default), accept-edits, smart and dangerous. Before this PR, rulesync accepted devin.permission_mode (the override is a loose object) but dropped it from rulesync generate --global without a warning, and an import lost it too.

Changes

  • DevinPermissionsOverrideSchema gains a validated permission_mode enum (exported as DevinPermissionModeSchema), so an unknown value fails validation.
  • Generate, global mode: an authored value is written to ~/.config/devin/config.json. The shared-config gateway now lists permission_mode among the permissions feature's owned keys for that file. If the override leaves it out, the value already in the file is kept.
  • Generate, project mode: the value is dropped with a warning, as devin.sandbox already is.
  • dangerous is written only when the user authors it, and it is named in a warning. The canonical rules never produce a value, not even allow-everything rules.
  • Import: a documented value is lifted back into the devin override. null (Devin's spelling of the default) is skipped, and any other value is skipped with a warning.
  • Docs: added permission_mode to the Devin override section of docs/reference/file-formats.md and regenerated docs-content.ts.

Verification

  • Unit tests cover: the global write, the dangerous warning, no value derived from canonical rules, the project-mode drop, the import round-trip, skipping a null or unknown value on import, and schema validation.
  • pnpm cicheck passes (614 files, 16832 tests).
  • Manual run: in a scratch HOME, generate --targets devin --features permissions --global wrote "permission_mode" to ~/.config/devin/config.json.

Refs #3413

🤖 Generated with Claude Code

https://claude.ai/code/session_01QUBBebviXSBQtiRAmDopZ7

dyoshikawa and others added 3 commits November 8, 2026 20:50
…rride

Devin CLI v3000.12.17 reads `permission_mode` (normal | accept-edits |
smart | dangerous) from the user config to choose the mode new local
sessions start in. Accept it in the `devin` override with value
validation, write it to ~/.config/devin/config.json in global mode, drop
it with a warning in project mode, warn when it is `dangerous`, and lift
it back into the override on import. It is never derived from the
canonical rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QUBBebviXSBQtiRAmDopZ7
…ect values

Name an imported `permission_mode: "dangerous"` in a warning, as generate
does, and skip a `permission_mode` found in a project `.devin/config.json`
(which Devin ignores) with a warning instead of lifting it. Document how
to revert a written mode and that accept-edits and smart also loosen
prompting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QUBBebviXSBQtiRAmDopZ7
…vin-permission-mode

# Conflicts:
#	src/generated/docs-content.ts
@dyoshikawa
dyoshikawa merged commit cb78939 into main Nov 8, 2026
14 of 15 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3413-devin-permission-mode branch November 8, 2026 13:17
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