Skip to content

Fix Codex usage collector approval policy - #7892

Closed
betnbd wants to merge 1 commit into
omacom:quattrofrom
betnbd:fix/codex-usage-approval-policy
Closed

betnbd wants to merge 1 commit into
omacom:quattrofrom
betnbd:fix/codex-usage-approval-policy

Conversation

@betnbd

@betnbd betnbd commented Aug 23, 2026

Copy link
Copy Markdown

Summary

  • replace the removed Codex untrusted approval policy with the supported non-interactive never policy
  • keep the app server in the existing read-only sandbox
  • assert the exact app-server launch arguments in the Codex collector test

Problem

Codex CLI 0.149.0 rejects the collector command before the app server starts:

error: invalid value 'untrusted' for '--ask-for-approval <APPROVAL_POLICY>'
[possible values: on-request, never]

Because the collector suppresses app-server stderr, the agents panel only reports Codex limits unavailable and stops updating rate limits.

Verification

  • bash test/shell.d/agent-usage-codex-scanner-test.sh
  • ran the patched collector against Codex CLI 0.149.0 and confirmed it returned the live plan and weekly limit window
  • git diff --check

The full ./test/shell suite reached and passed the Codex scanner test; unrelated local visual/environment checks failed later and the suite eventually requested interactive sudo.

Copilot AI balanced review requested due to automatic review settings August 23, 2026 13:50

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 for compatibility with Codex CLI 0.149.0.

Changes:

  • Replaces unsupported untrusted approval policy with never.
  • Adds an exact launch-argument assertion to the collector test.

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 non-interactive approval policy.
test/shell.d/agent-usage-codex-scanner-test.sh Verifies the app-server launch arguments.

💡 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

#7649 is merged (4cd8a08) and makes this same fix: the collector now launches app-server with -a on-request instead of the retired untrusted, with the launch arguments asserted in the collector test.

Closing as superseded — thanks for the fix.

@omarchybot omarchybot closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants