Fix session reconnect and Gemini startup regressions#93
Merged
Conversation
ab9f37d to
7ac8a95
Compare
4638790 to
926d5e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix three runtime correctness regressions in the acpx session/runtime path:
gemini.cmdWhy the session auto-close block was removed
The removed block in
runSessionQueueOwner()treatedlastAgentExitAtas proof that the saved session should be permanently closed when the queue owner shut down.That was too broad:
lastAgentExitAtis also set on normal successful prompt runs where the agent exits cleanlyclosed=trueon that path makes the next directory-walk lookup skip the saved session entirelyIn other words, the old logic conflated
agent exited sometime earlierwiththis session is permanently closed.Removing that block restores the intended behavior:
Changes
SESSION_MODE_REPLAY_FAILEDon replay failureVerification
pnpm run build:testpnpm run typechecknode --test --test-name-pattern='set-mode load fallback failure does not persist|desired mode replay cannot be restored|gemini ACP startup timeout|session remains resumable|reuses an already loaded client session' dist-test/test/cli.test.js dist-test/test/connect-load.test.js dist-test/test/integration.test.js