Skip to content

codex-plugin-v0.4.0

Choose a tag to compare

@gangtao gangtao released this 30 Nov 19:46
8d31f13

timeplus-agentguard-codex-plugin 0.4.0

What's changed

  • Each model request now carries its response. On PostModelRequest the plugin reads the response of that request from the Codex rollout file and adds it to the event: the text, its full length, the tool calls the model asked for (id and name) and the phase (commentary or final_answer). (#333, #332)
  • Request settings. The same event carries the turn's reasoning effort and summary settings.
  • Both exports. On the hooks export the new data is response and request in event_data. On the otel export it is the span attributes agentguard.response.text, agentguard.response.text_chars, agentguard.response.tool_calls (a JSON string), agentguard.response.phase, agentguard.request.effort and agentguard.request.summary.
  • Two new settings, the same as in the Claude Code plugin:
    • AGENTGUARD_LLM_CONTENT (default on): set to false to leave out the response text. The length, tool calls, phase and request settings are still sent.
    • AGENTGUARD_LLM_CONTENT_CHARS (default 4000): the response text is cut to this many characters.

Upgrading from 0.3.0

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

The response text is sent by default. To keep it out of Timeplus:

export AGENTGUARD_LLM_CONTENT=false

The fields are described in the plugin README.

Known limits

  • The plugin finds a request in the rollout file by its turn and token counts, and waits up to 0.5 s for the lines to be written. Codex waits for the hook, so in the worst case each model request is delayed by that much. When no match is found the event is sent without the new fields.
  • This was checked by replaying the rollout files of 26 real Codex sessions (2,195 model requests, all matched), not inside a live Codex session. Whether the response lines are already in the file when the hook fires is not confirmed.
  • The rollout file format is not a stable Codex interface. It was read as written by Codex 0.172.0.
  • The AgentGuard app does not read the new fields yet (timeplus-io/apps#80, timeplus-io/apps#96).

Full Changelog: codex-plugin-v0.3.0...codex-plugin-v0.4.0