Skip to content

Conversation

@pakrym-oai
Copy link
Collaborator

No description provided.

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.

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

)
.await;
}
compact::run_inline_auto_compact_task(sess.clone(), turn_context.clone()).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

P0 Badge Avoid double-running local compaction after remote

When token_limit_reached is true, we now call run_inline_remote_auto_compact_task (which replaces the conversation history with the remote-compacted summary) but then immediately call compact::run_inline_auto_compact_task on line 1906. That second call re-runs the legacy inline compaction and overwrites whatever the remote task just produced, so the new remote auto-compaction path can never take effect and we still spam the legacy summary. It also doubles the amount of compaction work every time the feature is enabled. Please skip the local inline call when the remote path runs so the remote result is preserved.

Useful? React with 👍 / 👎.

message: format!("Error running remote compact task: {err}"),
});
sess.send_event(&turn_context, event).await;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we sending token usage to indicate that the limits has been rested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll leave this to @jif-oai to follow up

Copy link
Collaborator

Choose a reason for hiding this comment

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

Was already the case but got cleaned here: #6894

Inline compact tasks no longer emit events directly; instead
`run_remote_compact_task_inner` now wraps an impl function to
standardize success/error events. Update callers to use imported
helpers and adjust tests to assert the completion message.
@pakrym-oai pakrym-oai merged commit 75f38f1 into main Nov 19, 2025
25 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/run-remote-auto-compaction branch November 19, 2025 08:44
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants