Repository navigation
feat(agent-tools): open a terminal child in the agent's own accept-edits or auto mode (FAP presets) - #5100
Conversation
…its or auto mode (FAP presets) A lead agent asking permission_preset accept-edits or auto gets a terminal child whose launch pins the agent's own mode of that name (Claude Code --permission-mode acceptEdits/auto, OmO --permission-preset accept-edits/auto), held by the same mode checks; harnesses lists per harness the presets it can hold.
From the omo gate and Codex reviews of #5093: - a Claude prompt told in another mode than the preset's launch pinned is stopped before it runs (the hub answers its UserPromptSubmit hook with a block); Claude tells no mode before the first prompt - a preset wider than read-only on another PC is refused before any card - permission_preset full-access on the terminal wire opens the write mode; mode write with another preset is refused - an explicit preset on a wire that cannot hold it is refused again, read-only too for an agent that never asks - the preset is kept in its own ledger field, so a build from before presets still reads children.json - harnesses lists no preset for an agent that runs unasked; Harness gains presets in the generated types - thread views tell ovis.mode (ordinary, write, accept-edits, auto) beside the spec's permission_preset - fixtures of the live runs: what Claude Code 2.1.330's hook told per launch mode, OmO 5.1.86 per preset - docs: OmO is held by its launch flag alone; Claude's hook refuses a drifted prompt
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Merged through
External PR by @code-yeongyu (his #5093, auto-closed when its base branch was deleted; his commit kept). Reviews on his head 9e110d6: omo gate (BLOCK: 2 MEDIUM) and Codex via the team proxy (gpt-6.2-sol-fast xhigh: no HIGH, 5 MEDIUM, 2 LOW); supply-chain clean; real Claude Code 2.1.330 and OmO 5.1.86 runs verified. One maintainer fix round (4fe3983) fixed every MEDIUM. Owner approved code-yeongyu's FAP PRs as a class (2026-12-01); lead asked to merge with pr-merge --update. LOW leftovers: none open. |
What
@code-yeongyu's #5093, rebased on main (after #5075) with one maintainer commit from its review round on top. His commit keeps his authorship; the review fixes could not be pushed to his branch (GitHub answered permission denied), so they land here instead. Thank you, @code-yeongyu.
FAP permission presets
accept-editsandautoopen a Claude Code or OmO terminal child in that agent's own mode of that name, pinned by its launch, for a lead agent only:accept-editsauto--permission-mode acceptEdits--permission-mode auto--permission-preset accept-edits--permission-preset autounsupportedunsupportedReview round (omo gate + Codex via the team proxy, gpt-6.2-sol-fast xhigh)
Supply chain: no dependency, lockfile, workflow or script change, no network call, no code taken from elsewhere.
Fixed in the maintainer commit:
SessionStartcarries none), so a child could take its first prompt in another mode (Manual, whenautois unavailable). The approval hub now answers theUserPromptSubmithook of a preset child withdecision: blockwhen the told mode is not the pinned one, so that prompt never runs; later sends are refused as before (mode_changed).read-onlyon another PC is refused before any card (it was dropped silently).permission_preset: "full-access"on the terminal wire opens the write mode (it opened the ordinary mode);mode: "write"with another preset is refused.read-onlytoo for an agent that runs everything unasked (Prime Agent);harnesseslists no preset for such an agent.preset), not as a new value ofmode: a build from before presets still readschildren.jsonafter a rollback.Harnessgainspresetsin the generated types.pinnedvalue is what the real hook told.Real-agent verification (isolated HOME, team proxy, cheap model)
claude -p, claude-haiku-4-5): its hook toldacceptEditsfor--permission-mode acceptEdits,autoforauto, anddefaultformanual; recorded inserver/agent-tools/fixtures/claude-2.1.330-preset-modes.json.omo -p):accept-editswrote the file unasked,autostill asked before the edit,read-onlyrefused; recorded inserver/agent-tools/fixtures/omo-5.1.86-preset-modes.json.accept-editsandautoanswernot_granted(scope_deniedin the FAP face).The open question in #5093
thread_readkeepspermission_preset: "read-only"for the ordinary mode, the nearest of the spec's four values (a client may treat the list as closed), and every thread view now also tellsovis.mode:ordinary(asks a person),write,accept-editsorauto. docs/fap.md says so.Checks
On this branch: typecheck green, generated types fresh,
bun testof server/agent-tools, server/approvals, the conventions, changelog and plugin-agent tests: 497 pass, 0 fail.Supersedes #5093.