Repository navigation
Feature/ai context tool budget - #40
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 554bd843c4
ℹ️ 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".
| let result = if tool_cache.contains(&cache_key) { | ||
| let result = cached_context_tool_result(); |
There was a problem hiding this comment.
Bound repeated cached tool calls
When the model repeats the same context tool call across follow-ups, this cache-hit path returns a result without advancing tool_calls_used or tool_result_bytes_used, so neither the call budget nor byte budget can ever trigger finalization. Before this change, repeated calls were capped by max_tool_calls; now a model that keeps asking for the same search_code/read_file can loop until the overall review timeout and force a failed or fallback review instead of being asked to submit findings.
Useful? React with 👍 / 👎.
No description provided.