Add sandbox and approval run profile controls
Merged
SL
5mo ago+383+383+012345678901234567890123456789-11-11-01234567890123456789
Summary\n- add named Codex run profiles for read-only inspect, workspace write, and elevated manual review\n- show effective sandbox and approval flags before send and require confirmation for write/elevated profiles\n- persist the selected default profile per workspace and pass the selected profile through the send flow\n- record the profile, sandbox, and approval policy on session history messages\n\n## Testing\n- pnpm -C apps/codex-claw lint\n- pnpm -C apps/codex-claw build\n- pnpm -C apps/codex-claw test\n\nCloses #87
Summary by cubic
Adds named Codex run profiles with sandbox and approval controls across chat and settings. Profiles sync with the workspace sandbox by default; write and elevated runs require confirmation and are recorded in history. Implements Linear #87.
- New Features
- Run profiles: Inspect (read-only), Write (workspace-write), Elevated (danger-full-access). Write/Elevated require confirmation.
- Profile–sandbox sync: profile defaults derive from sandbox; changing either keeps sandbox, approval, and profile aligned.
- Chat composer: profile selector shows “sandbox · approval”; confirm checkbox gates send; selection is saved per workspace and sent with the message.
- Settings: Run profile and Approval fields; defaults applied for new/duplicated workspaces.
- API/Server:
/api/sendacceptsrunProfileandconfirmedRisk; workspaces acceptcodexApprovalandrunProfile.codex-clipasses-sand-a, includes the profile in the prompt, stores profile/sandbox/approval on messages, and rejects risky sends without confirmation. Tests cover the confirmation guard and workspace defaults.