-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Summary
session/set_mode currently applies only to in-memory thread state. After process restart or session reload, previously selected mode may not be restored (especially collaboration modes such as plan introduced in ACP mode work).
Problem
Clients can successfully call session/set_mode, but if the ACP server is restarted and a session is loaded again, mode state may drift back to defaults unless the client re-applies mode every time.
This causes confusing behavior in persistent orchestration flows:
- mode switch appears successful
- reconnect/load happens later
- mode-dependent behavior no longer matches the last explicit user choice
Proposal
Persist a mode override store under codex home and replay on session load/new:
- Store file:
$CODEX_HOME/acp/session-mode-overrides.v1.json - Persist on successful:
session/set_modesession/set_config_optionwhenconfig_id == "mode"
- Replay in
new_session/load_sessionafter thread is initialized - Corrupt/missing file should be non-fatal (warn + continue)
Why in codex-acp (not only client-side)
Client replay is useful, but server-side persistence keeps behavior consistent across different ACP clients and reconnect patterns, and reduces mode drift when owners restart.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels