Copy-on-Write Overlay Filesystem

Description

Per-process overlay directory at ~/.claude/tmp/speculation/// used by the speculation engine to redirect all writes during speculative execution while leaving the real filesystem untouched. Read operations check the overlay first and fall through to the main filesystem on miss; writes trigger copyFile(cwd/rel -> overlayPath/rel) the first time a file is touched in a run. On accept (Tab), overlay files are merged back to main FS; on reject, the overlay directory is deleted.

Key claims

Relations

Sources

src-20260419-16b155f4f619