-
Notifications
You must be signed in to change notification settings - Fork 124
Description
Problem
check_existing_session() in start.sh only checks the legacy session directory ~/.copilot/history-session-state/ with glob pattern session_*_*.json. Copilot v0.0.342+ writes session state to ~/.copilot/session-state/ with a different naming convention. Sessions created by recent Copilot versions won't be detected, so the module starts a fresh session instead of resuming.
The rest of the resume logic is correct: --type copilot is present, --continue is passed when a session is found, and the prompt is correctly skipped on resume.
To reproduce: run the module with Copilot >= v0.0.342, create a conversation, stop/start. If the session was stored only in the new directory, check_existing_session() returns false and a fresh session starts despite state being on disk.
Desired outcome
Session detection works for both legacy and current Copilot versions.
Worth noting: copilot --continue gracefully starts a new session when none exists. The implementer should consider whether the existence check is still necessary at all, or whether always passing --continue when resume_session=true is simpler and more future-proof.
Version bump
patch