fix(codex): count reasoning as turn activity - #7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70fa0daa45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Completed reasoning proves that Codex is still advancing the | ||
| # turn. Keep it out of durable messages/final output, but clear | ||
| # the post-tool quiet watchdog just like commentary does. | ||
| return ProjectionResult(is_activity=True) |
There was a problem hiding this comment.
Count streaming reasoning deltas as activity
When Codex spends more than 90 seconds on a single post-tool reasoning item while actively emitting item/reasoning/delta or item/reasoning/summaryDelta, this return is never reached because project() returns an inactive result for every non-item/completed notification at lines 89–90. The post-tool watchdog therefore still interrupts an actively reasoning turn before the completed item arrives; mark reasoning delta notifications as non-durable activity as well so the fix covers long reasoning items, not only reasoning that completes within the timeout.
AGENTS.md reference: AGENTS.md:L54-L57
Useful? React with 👍 / 👎.
What
Treat completed Codex reasoning items as non-durable turn activity. They remain excluded from final output and message history, but clear the post-tool quiet watchdog.
Why
A live 5b review emitted a completed reasoning item nine seconds after its last tool result, then continued reasoning. Hermes ignored that activity and interrupted the turn at the 90-second post-tool threshold. The hardened oneshot correctly failed closed, but the review was still killed while Codex was active.
Verification