Start Pax in `read-only` permissions in an untrusted folder unless you chose a mode

DO
8m ago
+366-30

Start Pax in read-only permissions in an untrusted folder unless you chose a mode

Part of #12983

In an untrusted folder, decided or never decided, a Pax session now starts in read-only permissions: reads and searches run, while file writes and commands ask first. This closes the gap where trust was voice-only and a freshly cloned repository could still have the agent run commands under the default full mode.

  • Your choice wins. A mode counts as chosen when run.permissions is saved in your settings (/permissions, /config, /set). pax config reset run.permissions deletes the row, so the floor applies again. A project file's run.permissions is the repository's, so it is not a choice. Nothing writes the default back, so an unchosen mode stays unchosen.
  • Trusted folders are unchanged, and /trust yes lifts the floor from the next tool call.
  • One-line notice when it applies: interactive start (after the trust question), pax --web in its terminal, and pax -p on stderr.
  • The footer, /permissions and the web UI's permissions chip show the effective mode.
  • pax acp is untouched: it already asks the client for every write and command.
  • Docs: Folder trust and Permissions in reference.md, and FILE_MAP.md.

Tests run through create_shell and run_headless: untrusted with no choice is read-only, untrusted with an explicit full runs, trusted runs, trusting mid-session lifts it, a full that arrives through settings but is not saved is no choice, and the notice appears only when it applies.

[!WARNING]
Compatibility impact: Existing pax -p scripts that write files or run commands in a folder you never trusted, and never chose a permission mode for, now have those calls denied (no one can be asked). Interactive and web sessions in such folders now ask before every write and command.

Why this can ship in a minor release: Pax is an application, not an API, and the change tightens a default for the folder state the project documents as untrusted. It adds no API and removes none.

Migration: Trust the folder in pax (/trust yes), or choose a mode there (/permissions full), which saves it. Either lets headless runs proceed as before.

Checklist

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it. (Needs the compatibility impact label; no public API changes.)
  • PR title is fit for the release changelog.

šŸ¤– Generated with Claude Code