Data and security#
PacketCode keeps configuration, sessions, jobs, skills and related state under
its data home. The default is ~/.packetcode; PACKETCODE_HOME relocates the
whole tree when set before startup.
Back up PacketCode#
Prerequisites#
- Exit all PacketCode processes.
- Stop background agents and workflows.
- Preserve useful worktree commits in Git.
- Record
packetcode --versionand the value ofPACKETCODE_HOME. - Copy the complete data home to protected storage.
- Back up each project independently through Git.
- Protect configuration backups because they may contain provider keys.
Restore the complete data home while PacketCode is stopped. Do not overlay an older partial configuration on a newer state tree.
Security practices#
- Use environment variables or an external secret store for transient keys.
- Start unfamiliar work under an approval-based profile.
- Read complete commands before approval.
- Review MCP server packages and scripts before launching them.
- Pin SSH host keys and package versions.
- Keep worktrees and session storage off untrusted shared volumes.
- Run untrusted code in an external sandbox or disposable virtual machine.
Verify#
Run packetcode doctor, start a read-only session and confirm the data home,
provider, model and project root. Inspect Git status before and after the test;
it should not change.
If it does not work#
| Symptom | Check | Recovery |
|---|---|---|
| Sessions are missing after a move | Whether the data home resolved to a new path | Restore the previous data home rather than starting fresh |
| A backup restores but sessions will not resume | Whether the version matches | A newer binary can read an older home; the reverse is not guaranteed |
| A credential appeared in a diagnostic | Which surface produced it | Rotate the credential first, then see Collect a diagnostic log |
| You need to share a log | What it contains | The diagnostic log is designed to be shareable; a raw transcript is not |