Skip to content

codex-plugin-v0.4.1

Choose a tag to compare

@gangtao gangtao released this 30 Nov 21:47
7c24a1f

timeplus-agentguard-codex-plugin 0.4.1

A fix for 0.4.0. If you run 0.4.0, upgrade.

What's fixed

  • The response of a model request is now sent in a live session. Codex writes the line that closes a request in its rollout file after the PostModelRequest hook has returned. 0.4.0 looked for that line, so in a live session it sent no response and no request. 0.4.1 takes the response items written since the previous request of the turn. (#335, #336)
  • No delay on model requests. 0.4.0 waited 0.5 s on every model request for a line that was not coming. 0.4.1 does not wait when the response is in the file. It waits, up to 0.25 s, only when the file has nothing of the request yet.
  • Compaction requests are not looked up. Their summary is not a response item, so they are sent without response, and without a wait.

Documentation

  • response.tool_calls[].id is the model's call id. It equals the tool_use_id of the tool hooks for a function the model calls directly (spawn_agent, wait_agent). It does not for shell commands: the model calls exec with a script, and each command has a tool_use_id of its own. The 0.4.0 notes and README said the two always match.
  • PostModelRequest and the tool hooks of the same response run in no fixed order.

Upgrading

pip install -U timeplus-agentguard-codex-plugin (or pipx upgrade timeplus-agentguard-codex-plugin). No configuration change.

How it was checked

  • 13 live cases with Codex CLI 0.172.0 (codex exec) against Timeplus Enterprise with AgentGuard app 0.13.0, on both exports: tool calls, parallel commands, a failing command, apply_patch, content off, text limit, REST ingest, two turns, a sub-agent, an interrupted turn, forced compaction and a failed request. Every stored response matched the finished rollout file.
  • Replay of 54 rollout files (2,288 model requests, Codex 0.163 to 0.172).

Known limits

  • Not run live: the PermissionRequest hook, the interactive Codex TUI and desktop app, MCP and web search tool calls, and Codex versions other than 0.172.0.
  • The rollout file format is not a stable Codex interface.
  • The Agent Monitor of app 0.13.0 does not show the response of a Codex model request yet (timeplus-io/apps#106). The data is in the llm_response rows.