Repository navigation
fix: Manual mode shouldn't gate writes; cut Locked mode - #198
Merged
Merged
Conversation
Two corrections to the just-merged permission-mode PR (#197), caught in review before landing further work: 1. Manual mode was gating file writes by default (hitl_classes = [Write]). That's backwards for a coding agent whose core job is writing files — it would make every session nag constantly. Manual now matches today's actual default (writes free, only bash gated), as originally intended. Accept Edits currently behaves identically to Manual as a result, since Forge doesn't gate any other write-class tool by default; documented as such rather than papering over it. 2. Cut PermissionMode::Locked and Governance::deny_unapproved entirely. Locked's only reason to exist was CI/scripted runs where nothing can answer a prompt, but Forge has no non-interactive/headless entry point today — reachable only via Alt+P inside an interactive TUI session, which is a strange thing to want interactively. Re-add it once headless execution is real; docs/sandboxing-followup.md notes the dependency. The mode cycle is now Manual <-> Accept Edits only.
mohitranka
added a commit
that referenced
this pull request
Aug 21, 2026
…de (#198) Two corrections to the just-merged permission-mode PR (#197), caught in review before landing further work: 1. Manual mode was gating file writes by default (hitl_classes = [Write]). That's backwards for a coding agent whose core job is writing files — it would make every session nag constantly. Manual now matches today's actual default (writes free, only bash gated), as originally intended. Accept Edits currently behaves identically to Manual as a result, since Forge doesn't gate any other write-class tool by default; documented as such rather than papering over it. 2. Cut PermissionMode::Locked and Governance::deny_unapproved entirely. Locked's only reason to exist was CI/scripted runs where nothing can answer a prompt, but Forge has no non-interactive/headless entry point today — reachable only via Alt+P inside an interactive TUI session, which is a strange thing to want interactively. Re-add it once headless execution is real; docs/sandboxing-followup.md notes the dependency. The mode cycle is now Manual <-> Accept Edits only.
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
…de (#198) Two corrections to the just-merged permission-mode PR (#197), caught in review before landing further work: 1. Manual mode was gating file writes by default (hitl_classes = [Write]). That's backwards for a coding agent whose core job is writing files — it would make every session nag constantly. Manual now matches today's actual default (writes free, only bash gated), as originally intended. Accept Edits currently behaves identically to Manual as a result, since Forge doesn't gate any other write-class tool by default; documented as such rather than papering over it. 2. Cut PermissionMode::Locked and Governance::deny_unapproved entirely. Locked's only reason to exist was CI/scripted runs where nothing can answer a prompt, but Forge has no non-interactive/headless entry point today — reachable only via Alt+P inside an interactive TUI session, which is a strange thing to want interactively. Re-add it once headless execution is real; docs/sandboxing-followup.md notes the dependency. The mode cycle is now Manual <-> Accept Edits only.
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
…de (#198) Two corrections to the just-merged permission-mode PR (#197), caught in review before landing further work: 1. Manual mode was gating file writes by default (hitl_classes = [Write]). That's backwards for a coding agent whose core job is writing files — it would make every session nag constantly. Manual now matches today's actual default (writes free, only bash gated), as originally intended. Accept Edits currently behaves identically to Manual as a result, since Forge doesn't gate any other write-class tool by default; documented as such rather than papering over it. 2. Cut PermissionMode::Locked and Governance::deny_unapproved entirely. Locked's only reason to exist was CI/scripted runs where nothing can answer a prompt, but Forge has no non-interactive/headless entry point today — reachable only via Alt+P inside an interactive TUI session, which is a strange thing to want interactively. Re-add it once headless execution is real; docs/sandboxing-followup.md notes the dependency. The mode cycle is now Manual <-> Accept Edits only.
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
Two corrections to #197 (named permission modes), caught in review before any further work landed on top:
apply_mode(Manual)sethitl_classes = [Write], meaning every file write in the TUI would ask for approval by default — a coding agent's core job is writing files, so this would make every session nag constantly. Manual now matches today's actual default (hitl_classes = [], writes free, onlybashgated), as the original brief intended ("Manual (today's default)").Accept Editsis currently behaviorally identical toManualas a direct consequence — Forge doesn't gate any other write-class tool by default — and that's documented plainly rather than faked into looking different.PermissionMode::LockedandGovernance::deny_unapprovedentirely. Locked's only reason to exist was CI/scripted runs where nothing can answer a prompt, but Forge has no non-interactive/headless entry point today — it was only reachable by pressing Alt+P inside an interactive TUI session, which is a strange thing to want interactively. Re-add it once headless execution actually exists;docs/sandboxing-followup.mdnow notes that dependency explicitly.The mode cycle is now
Manual ↔ Accept Editsonly.Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --all-targets --locked(0 failures; forge-governance 42 tests, forge-tui 692 — both net-down from hitl: named permission modes (Manual / Accept Edits / Locked) #197 after removing the Locked-specific tests, updated the rest to match the corrected semantics)