Skip to content

Conversation

@seratch
Copy link
Member

@seratch seratch commented Jan 16, 2026

This pull request fixes #2317 by deferring responses.compact when a turn includes local tool outputs, avoiding compaction against response IDs that still have pending tool outputs on the server. It updates the session save path in src/agents/run.py to skip compaction for turns with ToolCallOutputItem/HandoffOutputItem, and adds a regression test in tests/memory/test_openai_responses_compaction_session.py to ensure compaction is skipped in this scenario.

@seratch seratch added this to the 0.6.x milestone Jan 16, 2026
@seratch seratch added bug Something isn't working feature:sessions labels Jan 16, 2026
Copy link

@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: 59532cf0b5

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

Copy link

@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: eb7c99f967

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

Copy link

@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: 606485edd4

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

@seratch seratch force-pushed the fix/defer-compaction-after-tool-outputs branch from 606485e to d2f0bb2 Compare January 16, 2026 12:18
@seratch seratch merged commit 86acfb4 into main Jan 16, 2026
9 checks passed
@seratch seratch deleted the fix/defer-compaction-after-tool-outputs branch January 16, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:sessions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compaction unusable in Runner.run_streamed: responses.compact runs before tool outputs are in chain

2 participants