If you have ever watched an AI agent crash mid-payment and wake up to double-charged credit cards, you know the pain. A new project called Forked, posted to Hacker News on October 22, 2026, aims to fix this by treating agent state like a Git repository. Developed by clibequilibrium, the tool allows agents to fork, rewind, and replay structured stateβ€”including messages, memory, and plansβ€”while ensuring side effects like emails and API calls remain effectively-once across retries.

The Mechanics of Idempotent Rewinds

The core innovation is a side-effect log that replays stored results instead of re-executing actions. For example, if an agent charges a card and then crashes, retrying the session triggers the log to return the original transaction result rather than running the charge again. This is enforced through recorded idempotency keys and a strict single-writer model in the cloud variant. The system uses content-addressed storage via SHA-256 and deterministic CBOR, ensuring that the same state always produces the same hash across any backend.

Performance and Architecture

Forked avoids the heavy overhead of sandbox snapshots or file system copies. Instead, it versions a persistent key-to-JSON map using a Hash Array Mapped Trie (HAMT). This architecture allows for O(1) forks; creating 1,000 branches takes approximately 1.4 milliseconds in memory and 276 milliseconds on durable SQLite, with zero bytes of state copied. Diffs are optimized to skip identical subtrees by hash, meaning computational work scales with the size of the change rather than the total state size.

Integration and Deployment Options

The project offers three deployment paths sharing a unified API: a Rust library for embedding, a self-hosted server using SQLite or Docker, and a managed cloud service on Cloudflare. For developers already in the LangGraph ecosystem, the @forked-run/langgraph package serves as a drop-in checkpointer, turning time-travel debugging into real branch rewinds. Additionally, an MCP server integration allows tools like Claude Code and Cursor to access checkpoint and rewind capabilities directly.

Key Takeaways

  • Forked uses HAMT structures to enable instant, zero-copy forks of agent state.
  • Side-effect logs ensure payments and API calls are effectively-once during retries.
  • The tool supports Rust, TypeScript, LangGraph, and MCP integrations.
  • Self-hosted and cloud options are available under the Apache-2.0 license.

The Bottom Line

Forked solves the 'stateful agent' problem by applying version control principles to execution history, eliminating the fear of irreversible side effects. It is a critical infrastructure piece for building reliable, production-ready AI agents that can safely explore multiple execution paths.