Skip to content

Fix Codex limits with current approval policy - #7825

Closed
sanjyay wants to merge 1 commit into
omacom:quattrofrom
sanjyay:fix/codex-app-server-approval
Closed

sanjyay wants to merge 1 commit into
omacom:quattrofrom
sanjyay:fix/codex-app-server-approval

Conversation

@sanjyay

@sanjyay sanjyay commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • launch the Codex app-server with the supported never approval policy
  • add regression coverage for the exact app-server arguments

Codex CLI 0.149.0 rejects the retired untrusted value before app-server initialization, which leaves the agents widget showing “Codex limits unavailable”.

Testing

  • bash test/shell.d/agent-usage-codex-scanner-test.sh
  • ./test/all (Codex coverage passes; unrelated existing/environment-dependent failures: a roomy window animates and omarchy-pkgs checkout is available for packaging coverage)

Copilot AI balanced review requested due to automatic review settings August 22, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Codex usage collector to use the supported approval policy and adds regression coverage.

Changes:

  • Replaces retired untrusted policy with never.
  • Verifies the exact Codex app-server arguments.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
bin/omarchy-agent-usage-codex Uses the supported Codex approval policy.
test/shell.d/agent-usage-codex-scanner-test.sh Adds argument regression coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for this, @sanjyay. quattro already fixes the bug: #7649 (commit 4cd8a08, merged 2026-08-25, closing #7648) changed the same codex -s read-only -a untrusted app-server call in bin/omarchy-agent-usage-codex to -a on-request. That is why this pull request now conflicts.

What was checked: I read the diff against quattro and confirmed that Codex CLI 0.157.1 rejects untrusted and accepts both on-request and never. So quattro's value works, and nothing is left broken for this change to fix. For this collector the difference between never and on-request doesn't matter: it only calls account/read and account/rateLimits/read and never starts a model turn, so nothing asks for approval either way. The test on quattro is also the stricter one. It records the arguments NUL-separated and compares them as an array, so a single "-a never" argument would fail it. The "$*" string comparison here would pass that. Nothing ran on a worker, because there is no bug left on the base branch to reproduce.

Second opinion: Codex at medium effort reviewed the same diff and reached the same conclusion, and it pointed out the difference between the two tests. It could read this review's reasoning, so it wasn't fully independent.

Next: this waits on the maintainer, and I'd recommend closing it as superseded by #7649.

@sanjyay sanjyay closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants