Add Pi AgentVFS checkpoint rewind integration#8
Merged
Conversation
added 3 commits
June 6, 2026 20:21
Fork the daemon before creating control, telemetry, and filesystem service threads, then keep libfuse in foreground mode so those threads remain alive after daemon startup. Harden startup and checkpoint failure handling around that flow: - report control-socket socket/bind/listen failures and clean up failed descriptors - validate existing object shard directories are writable during init_layout - track ObjectStore write errors and surface them through checkpoint serialization - skip ZERO_HASH leaves during bootstrap and tree serialization instead of failing the checkpoint - cover daemonized control-socket status and unwritable shard cases in tests
Introduce a Pi extension that binds Pi session events to a running ContextFS agentvfs daemon through agentvfs-ctl. The extension discovers the agentvfs FUSE mount for Pi's cwd, resolves the control socket from AGENTVFS_SOCK or /tmp, and disables itself when Pi is not running inside the mount. It records session-start, pre-tool, user bash, and turn-end checkpoints for mutating write/edit/bash activity, stores checkpoint entries in the Pi conversation stream when supported, and persists per-workspace checkpoint metadata under the user state directory for resumed sessions. It also adds the user-facing rollback surface: - /agentvfs status, checkpoint, rewind, tree on/off, and mount - /rewind compatibility flow with an undo stack backed by before-restore checkpoints - fork and /tree hooks that restore the workspace to the matching checkpoint before Pi switches conversation branches - footer status showing AgentVFS checkpoint availability Ship the package manifest and README documenting installation, runtime requirements, direct agentvfs-ctl usage, and the extension file layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a Pi coding-agent extension that integrates ContextFS AgentVFS checkpoints with Pi session
flow, conversation tree navigation, and manual rewind commands.
It also hardens the AgentVFS daemon startup path so background daemon mode keeps control/telemetry/
filesystem services alive, and improves checkpoint/object-store failure diagnostics used by the
extension.
Changes
foreground mode inside the daemonized child.
validation during store initialization.
extensions/pithat:/agentvfsand/rewindcommands/treenavigationcomparing AgentVFS rewind with Git-based rewind.
Testing
ZERO_HASHleaves.