Skip to content

Fix model-session state across pending-input re-entry - #689

Merged
GraciousGazelles merged 2 commits into
mainfrom
fix/preserve-model-session
Aug 31, 2026
Merged

GraciousGazelles merged 2 commits into
mainfrom
fix/preserve-model-session

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

  • retain one model client session across pending-input re-entry within a logical task
  • start subsequent logical turns with fresh model-session state
  • add focused WebSocket regression coverage for state and prompt routing

Validation

  • git diff --check 0148aa162027e0a5e30f731ac83efce9e7e8ee39..HEAD
  • cargo fmt --all -- --check
  • Rust compilation and tests intentionally deferred to hosted validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request refactors the management of ModelClientSession during execution turns. Instead of passing an optional prewarmed session to run_turn and consuming it, run_turn now accepts a mutable reference to the session. In RegularTask, the session is initialized once and passed by mutable reference across loop iterations, allowing state to be reused across outer re-entries. Additionally, a new integration test has been added to verify that the client session state is correctly reused. I have no feedback to provide as the changes are clean and well-tested.

@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 31, 2026
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit f29bade Aug 31, 2026
121 of 126 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/preserve-model-session branch August 31, 2026 21:13
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.

1 participant