Skip to content

Feature/ai context tool budget - #40

Merged
SwartzMss merged 12 commits into
mainfrom
feature/ai-context-tool-budget
Jul 17, 2026
Merged

SwartzMss merged 12 commits into
mainfrom
feature/ai-context-tool-budget

Conversation

@SwartzMss

Copy link
Copy Markdown
Owner

No description provided.

@SwartzMss

Copy link
Copy Markdown
Owner Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/review/ai.rs
Comment on lines +962 to +963
let result = if tool_cache.contains(&cache_key) {
let result = cached_context_tool_result();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@SwartzMss
SwartzMss merged commit 8b87fe6 into main Jul 17, 2026
1 check 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