Skip to content

fix: avoid retaining responses for every abandoned session - #1282

Merged
KazuCocoa merged 1 commit into
masterfrom
codex/fix-session-response-retention
Sep 30, 2026
Merged

KazuCocoa merged 1 commit into
masterfrom
codex/fix-session-response-retention

Conversation

@KazuCocoa

Copy link
Copy Markdown
Member

The HTTP server retains every abandoned session UUID and response for its entire lifetime. Repeated session creation and deletion therefore grows retained memory without a bound.

Check session admission against the current active session under the pending-request lock and construct the normal invalid-session response for stale IDs. Remove the historical response dictionary while preserving pending-request abandonment. Tests cover stale IDs, live sessions, and release of responses after many abandoned IDs.

Validation: all 178 native unit tests passed on an iOS 26.5 simulator using a local integration branch containing this review series. The regression tests are included in this PR. Native changes were built with Xcode 27.1. This intentionally returns the standard invalid-session response for new requests to old sessions, rather than retaining and replaying each historical response.

@KazuCocoa
KazuCocoa marked this pull request as ready for review September 29, 2026 05:13
@mykola-mokhnach

Copy link
Copy Markdown

@KazuCocoa Could you please also backport the HTTP server fixes to mac2 driver after they are approved and merged?

@KazuCocoa
KazuCocoa merged commit f245ffb into master Sep 30, 2026
57 of 60 checks passed
@KazuCocoa
KazuCocoa deleted the codex/fix-session-response-retention branch September 30, 2026 03:22
github-actions Bot pushed a commit that referenced this pull request Sep 30, 2026
## [16.13.3](v16.13.2...v16.13.3) (2026-09-30)

### Bug Fixes

* reject stale sessions without retaining past responses ([#1282](#1282)) ([f245ffb](f245ffb))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 16.13.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants