-
Notifications
You must be signed in to change notification settings - Fork 17
feat: add volume mount for ~/.copilot/session-state to persist events.jsonl #1469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -736,6 +736,8 @@ export function generateDockerCompose( | |||||||||||
| `${workspaceDir}:${workspaceDir}:rw`, | ||||||||||||
| // Mount agent logs directory to workDir for persistence | ||||||||||||
| `${config.workDir}/agent-logs:${effectiveHome}/.copilot/logs:rw`, | ||||||||||||
| // Mount agent session-state directory to workDir for persistence (events.jsonl) | ||||||||||||
| `${config.workDir}/agent-session-state:${effectiveHome}/.copilot/session-state:rw`, | ||||||||||||
|
||||||||||||
| `${config.workDir}/agent-session-state:${effectiveHome}/.copilot/session-state:rw`, | |
| `${config.workDir}/agent-session-state:${effectiveHome}/.copilot/session-state:rw`, | |
| // When running in chroot mode, the user's home is accessed under /host, | |
| // so also mount the same session-state directory to the chrooted home path. | |
| `${config.workDir}/agent-session-state:/host${effectiveHome}/.copilot/session-state:rw`, |
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New behavior (creating agent-session-state, preserving it on cleanup, and the new volume mount) isn’t covered by tests. src/docker-manager.test.ts already has coverage for the analogous agent-logs preservation; please add similar assertions for session-state so regressions are caught.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The “How it works” section describes mounts for
~/.copilot/session-state, but in AWF chroot mode the agent command runs inside/host(entrypoint.sh), so the effective path being written is under/host$HOME/.... Once the mount points are corrected, please update this section to reflect the chroot behavior (or clarify that the mount targets both chroot and non-chroot paths).