Persists GitHub Copilot CLI settings and chat history across rebuilds
"features": {
"ghcr.io/rosstaco/devcontainer-features/copilot-persistence:1": {}
}Inspired by the shell-history pattern, this feature:
- Mounts a named volume (scoped per dev container via
${devcontainerId}) to/copilot-data - Creates a symlink from
~/.copilot→/copilot-data - Sets ownership to the container user during installation (auto-detects from
$_REMOTE_USER)
Note: If
~/.copilotalready exists as a directory during installation, it is moved into the volume at/copilot-data/migrated-<timestamp>/before the symlink is created.
- ✅ Chat history and sessions
- ✅ CLI configuration (model preferences, settings)
- ✅ Command history
- ✅ Trusted folders
View the volume data:
ls -la /copilot-dataCheck the symlink:
ls -la ~/.copilotNote: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md.