Persist and replay desired mode across load fallback#46
Open
z-x-yang wants to merge 1 commit intoopenclaw:mainfrom
Open
Persist and replay desired mode across load fallback#46z-x-yang wants to merge 1 commit intoopenclaw:mainfrom
z-x-yang wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Author
|
Related upstream Codex ACP work for full plan-mode interoperability:
This ACPX fix is still independently useful because ACPX is where reconnect fallback ( |
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 mode loss across reconnect when
session/loadfalls back tosession/new.This persists the user's desired mode at the ACPX session-record layer and replays it on fresh ACP sessions created during fallback.
Changes
SessionAcpxState.desired_mode_idpersistence support.src/session-mode-preference.tshelpers to normalize/read/write desired mode.set-mode <mode>set mode <value>including queue-owner control paths.
connectAndLoadSession, when fallback creates a fresh ACP session, replaydesired_mode_idviasession/set_mode.Tests
Added/updated tests:
test/cli.test.tsset-mode persists across load fallback and replays on fresh ACP sessionstest/session-conversation-model.test.tsdesired_mode_idtest/session-persistence.test.tsdesired_mode_idtest/mock-agent.tssetSessionMode/setSessionConfigOptionsupport for mode/config replay scenariosValidation run locally:
npm run format:checknpm run build:testnode --test dist-test/test/session-conversation-model.test.jsnode --test dist-test/test/session-persistence.test.jsnode --test --test-name-pattern='set-mode persists across load fallback and replays on fresh ACP sessions' dist-test/test/cli.test.jsFixes #45.