Skip to content

core: add focused diagnostics for remote compaction overflows#11133

Open
charley-oai wants to merge 26 commits intomainfrom
cc/compact-failure-logging
Open

core: add focused diagnostics for remote compaction overflows#11133
charley-oai wants to merge 26 commits intomainfrom
cc/compact-failure-logging

Conversation

@charley-oai
Copy link
Collaborator

Summary

  • add targeted remote-compaction failure diagnostics in compact_remote logging
  • log the specific values needed to explain overflow timing:
    • last_api_response_total_tokens
    • estimated_tokens_of_items_added_since_last_successful_api_response
    • estimated_bytes_of_items_added_since_last_successful_api_response
    • failing_compaction_request_body_bytes
  • simplify breakdown naming and remove last_api_response_total_bytes_estimate (it was an approximation and not useful for debugging)

Why

When compaction fails with context_length_exceeded, we need concrete, low-ambiguity numbers that map directly to:

  1. what the API most recently reported, and
  2. what local history added since then.

This keeps the failure logs actionable without adding broad, noisy metrics.

Testing

  • just fmt
  • cargo test -p codex-core

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

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

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: 9456959a82

ℹ️ 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".

@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Breezy!

ℹ️ 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".

@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

Base automatically changed from cc/compact-token-delta to main February 9, 2026 16:35
@charley-oai
Copy link
Collaborator Author

@codex review this

@charley-oai charley-oai force-pushed the cc/compact-failure-logging branch from 452af63 to dbd9e25 Compare February 9, 2026 18:24
@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ 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".

@charley-oai charley-oai enabled auto-merge (squash) February 9, 2026 20:35
@charley-oai charley-oai disabled auto-merge February 9, 2026 20:35
@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ 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".

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.

3 participants