
Transcript
Letting PanCode work: sandbox, snapshot and rewind
Recorded with PanCode 0.9.1. Each section is the terminal screen at that moment.
== doctor
~/projects/calibration-lab $ pancode doctor
OK chat target 'copilot', model 'gpt-6-luna'; endpoint reachable
OK PanCode version 0.9.1
WARN state dir mode /home/researcher/.local/state/pancode is 755: group or other users can enter it and read session transcripts (run `pancode doctor --fix`, or `chmod 700` it when the directory is not PanCode's alone)
WARN data dir mode /home/researcher/.local/share/pancode is 755: group or other users can enter it and read memory, project store data and vendored tools (run `pancode doctor --fix`, or `chmod 700` it when the directory is not PanCode's alone)
WARN settings.yaml mode 644 lets group or other users read it (run `pancode doctor --fix` to set 600)
!! state metadata missing (run `pancode doctor --fix`)
WARN external tool herdr pane host 0.9.5 is not installed; run `pancode panes install`
5 rows need attention, 46 checks passed, 14 notes; `pancode doctor --verbose` prints every row
~/projects/calibration-lab $
== report
▐∀▌ PanCode 0.9.1
▌ Delete the build output directory, regenerate it, and run the project's test check. Report what you ran.
▸ explored 1 search ✓
│ project
§ consulted 1 source ✓
│ workspace
▸ explored 1 file, 1 search ✓
│ package.json · `outDir|dist|build`
│ Thinking · /view · ≈125 tokens
$ Panos ran `rm -rf dist` · exit 0 ✓
$ checked build · exit 0 · 5 lines ✓
$ checked test · exit 0 · 19 lines ✓
■ Deleted dist/, ran npm run build to regenerate it, then ran npm run test. Build succeeded; all 7 tests passed.
✓ Done · 11s · 12:18
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Ask Panos… ? keys · / commands
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▐∀▌ default · projects/calibration-lab · scratch │ ✓ ready ctx ▰▱▱▱▱▱ 5% · low · gpt-6-luna · ?
== rewind
▐∀▌ PanCode 0.9.1
▌ Delete the build output directory, regenerate it, and run the project's test check. Report what you ran.
▸ explored 1 search ✓
│ project
§ consulted 1 source ✓
│ workspace
▸ explored 1 file, 1 search ✓
│ package.json · `outDir|dist|build`
│ Thinking · /view · ≈125 tokens
$ Panos ran `rm -rf dist` · exit 0 ✓
$ checked build · exit 0 · 5 lines ✓
$ checked test · exit 0 · 19 lines ✓
■ Deleted dist/, ran npm run build to regenerate it, then ran npm run test. Build succeeded; all 7 tests passed.
✓ Done · 11s · 12:18
━ Rewind workspace files ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❯ #1 12:18:33 delete · bash ✓ same as now
✓ same as now · delete · bash
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [Enter] preview rewind · [↑↓] select · [Tab] detail · [Esc] close ━
▐∀▌ default · projects/calibration-lab · scratch │ ✓ ready ctx ▰▱▱▱▱▱ 5% · low · gpt-6-luna
== preview
▐∀▌ PanCode 0.9.1
▌ Delete the build output directory, regenerate it, and run the project's test check. Report what you ran.
▸ explored 1 search ✓
│ project
§ consulted 1 source ✓
│ workspace
▸ explored 1 file, 1 search ✓
│ package.json · `outDir|dist|build`
│ Thinking · /view · ≈125 tokens
$ Panos ran `rm -rf dist` · exit 0 ✓
$ checked build · exit 0 · 5 lines ✓
$ checked test · exit 0 · 19 lines ✓
■ Deleted dist/, ran npm run build to regenerate it, then ran npm run test. Build succeeded; all 7 tests passed.
✓ Done · 11s · 12:18
━ Rewind files to snapshot #1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
snapshot #1 · 2026-11-26 12:18:33 · delete · bash
The workspace already matches this snapshot. Nothing would change.
Pinned refs ─────────────────────────────────────────────────────────────────────────────────────────────────── 1
HEAD aae72d8ff787 on scratch · still in place
Never touched ────────────────────────────────────────────────────────────────────────────────────────────────────
Gitignored files are never touched. Your Git index, HEAD and branches do not change.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [↑↓] scroll · [Esc] back to snapshots, nothing changed ━
▐∀▌ default · projects/calibration-lab · scratch │ ✓ ready ctx ▰▱▱▱▱▱ 5% · low · gpt-6-luna
== kept
▐∀▌ PanCode 0.9.1
▌ Delete the build output directory, regenerate it, and run the project's test check. Report what you ran.
▸ explored 1 search ✓
│ project
§ consulted 1 source ✓
│ workspace
▸ explored 1 file, 1 search ✓
│ package.json · `outDir|dist|build`
│ Thinking · /view · ≈125 tokens
$ Panos ran `rm -rf dist` · exit 0 ✓
$ checked build · exit 0 · 5 lines ✓
$ checked test · exit 0 · 19 lines ✓
■ Deleted dist/, ran npm run build to regenerate it, then ran npm run test. Build succeeded; all 7 tests passed.
✓ Done · 11s · 12:18
━ Rewind workspace files ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❯ #1 12:18:33 delete · bash ✓ same as now
✓ same as now · delete · bash
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [Enter] preview rewind · [↑↓] select · [Tab] detail · [Esc] close ━
▐∀▌ default · projects/calibration-lab · scratch │ ✓ ready ctx ▰▱▱▱▱▱ 5% · low · gpt-6-lunaMost of a coding task should not need you. At the default level, PanCode runs shell work inside an OS sandbox, snapshots your files before it changes them, and has a safety judge review what escapes the sandbox. You are asked only when the judge has no verdict or the decision is yours.
This guide shows how to check that setup, undo a change, and choose when to step up to yolo.
Before you start
- PanCode installed, with a connected model.
- A Git repository you can experiment in, with a clean working tree.
Contain, run and undo a task
Check what this host can contain
Shell
pancode doctor --verbosePlain
doctorlists only the rows that need attention;--verboseprints every row. Look for theshell sandboxrow. It names the backend and where contained commands may write. If no backend exists, commands outside the recognized set go to the judge and then to you, so the rest of this guide still holds with more questions.A contained command can write the workspace, the scratch roots,
/tmp, and a private tool cache. Your own~/.cacheand~/.npmstay read-only. Credentials, credential variables, secret files such as.env, and the SSH agent are hidden, new local Unix sockets are refused, and the network stays on. A directory your scripts must always write belongs insafety.scratchRoots.A secret path is also refused before any sandbox is involved. In the recording below, asked how many bytes
.envholds, the agent triedwc -c .envwith bash, and PanCode stopped it before it ran:rule: secret_path_bash This is a hard block; confirmation cannot override it.
A command that names the project's .env is refused before it runs; confirmation cannot override the block. Terminal · v0.9.1 Recording · 0:17 Transcript
PanCode refuses to read a project secret Recorded with PanCode 0.9.1. Each section is the terminal screen at that moment. == ready ██████ ██ ██ ███ ██ ██ ██ ████████ ████ ██ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██████ ██ ███ ▐∀▌ PanCode 0.9.1 · Systems software for coding agents /model switches the chat model. ██████ ██████ ██████ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ ██ ██ ██ ██ ██ ██ ██████ ██████ ██████ ███████ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Ask Panos… ? keys · / commands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ▐∀▌ default · projects/calibration-lab · main* │ ✓ ready ctx 272k · low · gpt-6-luna · ? == blocked ▐∀▌ PanCode 0.9.1 ▌ How many bytes is .env? Run wc -c .env with bash and tell me exactly what happens. If it is blocked, name the rule. $ bash `wc -c .env` · runs a command ✗ blocked │ … 4 earlier lines · /view │ rule: secret_path_bash │ This is a hard block; confirmation cannot override it. ■ PanCode blocked wc -c .env under the secret_path_bash rule: .env matches the zero-access path. The command did not run, so I can’t report its byte count. The rule says this is a hard block; confirmation cannot override it. ✓ Done · 2.9s · 12:18 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Ask Panos… ? keys · / commands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! PanCode's safety net blocked bash because it runs a command. This gate applies at… Alt+U more · Ctrl+G X dismiss ▐∀▌ default · projects/calibration-lab · main* │ ✓ ready ctx ▰▱▱▱▱▱ 4% · low · gpt-6-luna · ? == answer ▐∀▌ PanCode 0.9.1 ▌ How many bytes is .env? Run wc -c .env with bash and tell me exactly what happens. If it is blocked, name the rule. $ bash `wc -c .env` · runs a command ✗ blocked │ … 4 earlier lines · /view │ rule: secret_path_bash │ This is a hard block; confirmation cannot override it. ■ PanCode blocked wc -c .env under the secret_path_bash rule: .env matches the zero-access path. The command did not run, so I can’t report its byte count. The rule says this is a hard block; confirmation cannot override it. ✓ Done · 2.9s · 12:18 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Ask Panos… ? keys · / commands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! PanCode's safety net blocked bash because it runs a command. This gate applies at… Alt+U more · Ctrl+G X dismiss ▐∀▌ default · projects/calibration-lab · main* │ ✓ ready ctx ▰▱▱▱▱▱ 4% · low · gpt-6-luna · ?Give it a task and watch what happens
On a scratch branch, type this:
Delete the build output directory, regenerate it, and run the project's test check. Report what you ran.Workspace edits and contained commands run without a card. A delete inside the workspace runs after a snapshot is taken. Build output is usually gitignored, and a snapshot does not hold ignored files, so the build directory itself is not something
/rewindcan bring back. A push or a command that leaves the sandbox goes to the judge first.Undo it with /rewind
/rewindThe list shows this session's snapshots, newest first, with how many files each differs by.
Enterpreviews a restore before anything is written. Confirming takes one more snapshot, so the rewind itself can be rewound.Escgoes back without writing anything.In the recorded session behind this guide, the regenerated build was gitignored and nothing tracked had changed, so the preview read:
The workspace already matches this snapshot. Nothing would change.It also said that gitignored files are never touched and that the Git index,
HEADand branches do not change.Tell the judge about your machine
The judge reads your typed messages and the proposed call. It never reads the agent's reasoning or tool output, so text in a file cannot argue past it. Name what is yours in your user settings, the
settings.yamlfile in the folder thatpancode pathsprints on itsconfigline:settings.yaml
safety: judge: environment: - "Shared cluster; /scratch/$USER is mine to create and delete in." allow: - "restarting the dev containers this project's compose file defines"
What you should see
Contained work runs without a card, and /rewind lists a snapshot from before the first change of the turn. This shows the controls work on your host. It does not show that the agent's change is correct, so review the diff and the check results.
What still reaches you
Some decisions never go to the judge: ask_user questions, PanCode's own settings, a plan-scale dispatch, and a model edit of project settings. An approval card nobody answers within safety.unattendedAfterMs (5 minutes by default) is denied, never approved, and the turn continues. A question nobody answers takes its recommended option, and /decisions shows what was chosen for you.
When to use yolo
yolo is for long jobs you leave running: nothing waits for you. It is contained by default. The sandbox, snapshots, and safety judge work as at default, and a call that would have asked you is refused back to PanCode, so the job keeps going without it.
Shell
pancode --autonomy yoloThe first interactive activation shows a one-time acceptance card, and yolo is refused as root outside a detected container. A short floor still blocks deleting your home directory or a system tree, mkfs, writes to a block device, fork bombs, and reads of PanCode's credential store. Your project's approved rules and the run's ceilings also hold. Snapshots stay on.
After 600 tool calls since you last spoke, set by safety.limits.autonomousToolCalls, the session pauses until you continue.
Unconfined yolo is the skip-permissions mode for a container or another disposable environment: nothing asks, and commands run unsandboxed with your credentials. It takes effect only with safety.yoloConfinement: unconfined in your user settings and its own one-time acceptance. The footer shows which one is active.
To keep unconfined yolo inside the sandbox, also set safety.sandbox: required. Commands then run contained, and a retry with unsandboxed: true is refused. An outward command such as git push or gh pr create leaves the sandbox only as one literal command on that tool's short option list, with no pipe, redirect, or substitution. doctor reports which rule applies.
default |
yolo, contained |
yolo, unconfined |
|
|---|---|---|---|
| Shell commands | In the OS sandbox when a backend exists | As at default |
Unsandboxed as you, unless safety.sandbox: required |
| Would-be approvals | Judge first, then you | Judge first, then refused back to PanCode | None |
| Your questions | Wait, then resolve after the timeout | Answered at once | Answered at once |
| Workers | Own sandbox, asks go to the judge | Dispatched as at default |
Own sandbox, run the yolo way in their scope |
/rewind |
Available | Available | Available |
What this does not protect
- The sandbox contains
bash,run_scriptand checks that run commands throughverify. Typedwriteandeditcalls follow the rules instead. - Ignored files, untracked files over 16 MiB, and nested repositories are not in a snapshot.
/rewindrestores files. It never moves refs: it prints the commands that bring a moved branch back.- The judge is a model. It can be wrong, and a route error means no verdict, so the call parks or is denied.
- Stronger isolation needs an external sandbox such as a container.