Skip to content

fix(sessions): recover failed resumed Session writes before model calls - #4630

Merged
seratch merged 1 commit into
mainfrom
fix/resume-session-write-recovery
Aug 24, 2026
Merged

fix(sessions): recover failed resumed Session writes before model calls#4630
seratch merged 1 commit into
mainfrom
fix/resume-session-write-recovery

Conversation

@seratch

@seratch seratch commented Aug 24, 2026

Copy link
Copy Markdown
Member

This pull request fixes #4615 by retaining failed resumed Session appends and reconciling them before further model calls, without rerunning completed tools.

Invalidate stale compaction caches after failed or cancelled appends while preserving configured retrieval-window behavior. Keep full-history reads confined to replacement rollback and recovery.

Recovery requires the original backend and exclusive history access. Handoff/terminal recovery and distributed exactly-once execution remain outside this fix.

@seratch seratch added this to the 0.22.x milestone Aug 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-24T23:30:29.751348Z 787f9d6 Manual request
🔒 Security Review Completed 2026-08-24T23:33:25.206769Z 787f9d6 Manual 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@seratch seratch changed the title fix: recover failed resumed Session writes before model calls fix(sessions): recover failed resumed Session writes before model calls Aug 24, 2026

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

ℹ️ 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/agents/run_internal/session_persistence.py

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

ℹ️ 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/agents/run_internal/session_persistence.py
@seratch
seratch force-pushed the fix/resume-session-write-recovery branch from e0d7e75 to aa2d20e Compare August 24, 2026 22:50

@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 Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: aa2d20e4b3

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/agents/memory/openai_responses_compaction_session.py Outdated
@seratch
seratch force-pushed the fix/resume-session-write-recovery branch from aa2d20e to 787f9d6 Compare August 24, 2026 23:17
@seratch
seratch merged commit 40f0d9f into main Aug 24, 2026
17 checks passed
@seratch
seratch deleted the fix/resume-session-write-recovery branch August 24, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RunState retry after an approved tool's Session write fails leaves an orphan tool call

1 participant