Skip to content

feat(agents): Codex login and limit states, compaction and connected tools (A3d) - #253

Merged
httpsphl merged 1 commit into
mainfrom
feat/codex-gaps
Oct 10, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/codex-gaps

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

Closes the gaps of the Codex bot that were open after #251, before 0.15.0 is published.

  • Login and limit. account/read goes with the handshake; no account, or a turn that ends unauthorized, puts the bot in auth_error with a notice to sign in to Codex and restart it. usageLimitExceeded puts it in rate_limited until the window's resetsAt (from account/rateLimits/updated; five minutes without it). Messages wait and go out after the reset, as for Claude.
  • Compact. bots.compact works for Codex: the wrapper sends thread/compact/start. Codex runs it as a turn with a contextCompaction item; Botloft shows 'compacting', then the notice, and no turn line. The panel says Codex also compacts by itself.
  • Connected tools. The owner's MCP servers go into the thread's mcp_servers with their secrets in place (the botloft server is never replaced). A third-party tool's name for its approval card is read from the request's message.
  • Docs: spec 30.1 (A3d) and 30.3.2.

Real Codex 0.148.0-alpha.9, through the daemon: 17,930 of 258,400 tokens; bots.compact gave 'compacting', the notice and no turn line, and the bot still remembered the word it was given.

Not provoked in the real Codex: signed-out and limit-reached (no safe way); they are covered with the FakeRuntime from the shapes in the app-server schema (CodexErrorInfo).

Tests: four new in codex_bot.rs (signed out, limit, compaction, connected tools), wire and decoder unit tests, app test for the Codex compact button; fmt, clippy -D warnings, cargo test --workspace and pnpm check pass.

…tools (A3d)

- account/read at the handshake and codexErrorInfo unauthorized end in
  auth_error with a notice; usageLimitExceeded pauses the bot until the
  window's resetsAt.
- bots.compact works for Codex: thread/compact/start through the wrapper;
  the compaction turn shows a notice and no turn line.
- The owner's connected tools go in the thread's mcp_servers, secrets in
  place; a third-party tool's name is read from the request's message.
Checked with the real codex: compaction through the daemon.
@httpsphl
httpsphl merged commit 923d288 into main Oct 10, 2026
4 checks passed
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