Skip to content

fix: Manual mode shouldn't gate writes; cut Locked mode - #198

Merged
github-actions[bot] merged 1 commit into
mainfrom
hitl-fix-manual-mode-writes
Aug 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
hitl-fix-manual-mode-writes

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Two corrections to #197 (named permission modes), caught in review before any further work landed on top:

  1. Manual mode was gating file writes by default. apply_mode(Manual) set hitl_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, only bash gated), as the original brief intended ("Manual (today's default)"). Accept Edits is currently behaviorally identical to Manual as 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.
  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 — 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.md now notes that dependency explicitly.

The mode cycle is now Manual ↔ Accept Edits only.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo 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)

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.
@github-actions
github-actions Bot enabled auto-merge (squash) August 3, 2026 08:04
@github-actions
github-actions Bot merged commit e48ad08 into main Aug 3, 2026
7 checks passed
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.
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