Skip to content

feat(sdk): read Codex managed config requirements - #186

Open
dines-oai wants to merge 1 commit into
mainfrom
feat/codex-read-config-requirements
Open

dines-oai wants to merge 1 commit into
mainfrom
feat/codex-read-config-requirements

Conversation

@dines-oai

Copy link
Copy Markdown

What and why

Adds CodexAxonConnection.readConfigRequirements(), a wrapper for the Codex app-server's configRequirements/read. It also exports the ConfigRequirements and ConfigRequirementsReadResponse types.

Codex sessions signed in to a ChatGPT Business, Enterprise, or Edu workspace inherit the workspace admin's managed policy, for example allowed sandbox modes or permission profiles. If a client asks for something the policy forbids, thread/start can fail, or Codex can fall back to its defaults. Today a client cannot ask for the policy first, because request() is private and readConfig() (config/read) does not include requirements. Reflex needs this to choose its Codex agent permissions up front (runloopai/reflex#5341).

Change

  • readConfigRequirements() sends configRequirements/read with the params field omitted. The wire type is Option<()>, matching getAccountRateLimits().
  • The response's requirements is null when no policy applies.
  • I added it to the wire-params test and to the method tables in sdk/README.md and sdk/AGENTS.md.

Checklist

  • PR title follows <type>(<scope>): <description> format
  • bun run check passes (lint + format)
  • bun run build passes
  • bun run test passes (653 tests)
  • SDK documentation updated

I checked the method by hand against the Codex 0.159.1 app-server: it returns {"requirements": null} without a policy, and the allowed sandbox modes or profiles when /etc/codex/requirements.toml sets them.

🤖 Generated with Claude Code

Adds CodexAxonConnection.readConfigRequirements(), wrapping the app-server's
configRequirements/read, and exports the ConfigRequirements types. Clients use
it to choose thread permissions an organization's managed policy allows
instead of discovering the policy from a failed thread/start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reflex-loop

reflex-loop Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

⚠️ Reflex agent status: Error

Agent Status
agt_6yKSJYRvCGSmT7bxGP3H4T ⚠️ Error

This PR was created by Reflex.

This comment updates in place as agents work.

@dines-oai
dines-oai marked this pull request as ready for review October 20, 2026 23:57
@dines-rl
dines-rl enabled auto-merge (squash) October 23, 2026 02:25

This branch has not been deployed

No deployments
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.

1 participant