Make permission approvals more reusable and explain the saved authorization scope

Open 💬 2 comments Opened Apr 13, 2026 by qiankunli

What variant of Codex are you using?

App (desktop), but this likely affects other interactive Codex surfaces that use the same approval model.

What feature would you like to see?

I would like the permission / escalation approval flow to make reusable authorization much clearer, and to reduce repeated prompts for near-identical commands.

Today, the experience is hard to reason about:

  • I often want to approve a class of safe commands, not one exact shell string.
  • In practice, the remembered approval often ends up feeling tied to a very specific command shape.
  • When Codex generates long one-off shell commands such as cd <repo_root> && ..., the reusable approval scope becomes narrow and brittle.
  • The UI does not clearly explain what will actually be remembered: exact command, command prefix, working directory, argv shape, or something else.

This leads to a frustrating loop where I approve something once, then get asked again for a very similar command later.

A representative example is when Codex asks to run something like:

cd /path/to/repo/backend && PYTHONPATH=. uv run pytest tests/test_in_local/test_tracing_config.py -q

If I choose the equivalent of "yes, and don't ask again for future commands with this prefix", it is not obvious whether I just approved:

  • this exact test file
  • this exact shell string
  • uv run pytest ... in that repo
  • any pytest run in that working directory
  • or some narrower argv shape than I expect

From a user perspective, it feels too easy for the saved approval to become overly specific, which means repeated prompts for commands that are logically the same category of work.

Requested improvements:

  1. Clearly show the exact reusable authorization scope before saving it.
  • For example: "This will remember a prefix rule for [\"uv\", \"run\", \"pytest\"] in working directory ..." or whatever the real scope is.
  1. Prefer stable command shapes when presenting approval prompts.
  • If the working directory can be represented separately, avoid collapsing everything into one long cd ... && ... shell string.
  1. Let the user broaden or adjust the saved scope at approval time.
  • Example: approve only this exact command, approve this command prefix, or approve this tool family in this repo.
  1. Detect repeated near-identical approval prompts and suggest a reusable rule automatically.
  2. Document the actual mental model clearly.
  • Is approval keyed by exact argv?
  • command prefix?
  • shell wrapper shape?
  • working directory?
  • sandbox escape type?

The goal is not to weaken safety. The goal is to make the approval model understandable and reduce unnecessary repeated prompts when the user is intentionally authorizing a bounded, repeatable workflow.

Additional information

What is currently confusing is the mismatch between user intent and saved authorization behavior:

  • User intent: "stop asking me for this kind of operation".
  • Observed behavior: the saved approval can behave more like "stop asking only for this very specific command spelling".

That makes users wonder whether approval is tied to a file, a full shell string, or some hidden command-shape rule.

Even a small UX improvement here would help a lot:

  • explain what is being saved
  • normalize commands for approval when possible
  • make reusable scopes first-class in the UI instead of implicit side effects

This feels especially important for interactive use, where the value of Codex is reduced if users have to repeatedly re-approve near-duplicate commands.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗