u/wesh-k

AI Agents Need Rollback More Than They Need Autonomy

I have been thinking about transactions in most agent frameworks.

Consider an agent executing a sequence of five tool calls. If the third tool encounters an error, the resulting state is neither the user's intended outcome nor the system's state before execution began. Consequently, the agent has no systematic way to recover, and even a human operator must reconstruct what happened from incomplete evidence.

This issue is not a problem with the tooling itself; it is a fundamental primitive missing from the stack.

Databases have addressed this problem for 50 years, and distributed systems have been grappling with it for decades. A rich terminology exists to articulate this concept: ACID, sagas, compensating actions, idempotency keys, two-phase commit, and write-ahead logs. Maybe some of these concepts have been incorporated into agent frameworks, but I haven't encountered them in production so far.

Currently, the prevailing pattern is as follows:

- Execute a sequence of tool calls.

- If an error occurs, request the LLM to "figure it out."

- Remain hopeful for a favorable outcome.

- Log "task complete" when the loop concludes.

This approach proves effective when agents perform reversible actions within isolated environments. However, it fails when agents interact with file systems, deployments, external APIs with side effects, payment flows, or databases, all of which a human would expect to behave transactionally rather than leaving partial state behind.

The question is not "How autonomous can we make agents?" but rather "How can agents express their intent over operations that necessitate retries, compensation, or rollbacks?"

Will making the LLM intelligent enough to handle these situations be enough? This is the same mistake distributed systems already made, assuming that the application layer would independently resolve these issues. That assumption proved incorrect, and the infrastructure had to take the lead.

The promising next generation of solutions will likely deviate from the concept of smarter loops and instead focus on the following:

- Establishing explicit transaction boundaries.

- Registering compensating actions for each tool.

- Incorporating idempotency keys into tool calls.

- Utilizing replay logs that extend beyond mere chat history.

- Recognizing approval gates as first-class primitives.

- Implementing partial-failure recovery mechanisms that do not require the LLM to engage in reasoning.

Or am I way off? Let me know your thoughts.

u/wesh-k — 5 days ago
▲ 3 r/Anthropic+1 crossposts

Patchwork is an attempt to treat AI workflows more like infrastructure than magic

The part of Patchwork OS that probably doesn’t get enough attention is that it treats AI work like something that should actually be inspectable later.
A lot of agent centric projects feel magical for 5 minutes until you try to operationalize them. Then you hit the same wall every time:

What precisely transpired? Why did it arrive at that decision? What factors contributed to the change? Who authorized it? Is it feasible for this process to operate reliably tomorrow?

Most systems still behave like a black box with a terminal attached to it.
My project is trying to solve the boring but necessary layer around agents:

recipes, approval queues, durable trace memory, structured execution, MCP tools, recoverable workflows.

That sounds less exciting than “fully autonomous AI employee,” but I think it is actually the more important direction.
The future probably does not belong to single giant agents doing everything. It belongs to systems of smaller coordinated workflows that humans can inspect, interrupt, fork, audit and improve over time.

You stop “chatting with a model” and start building operational infrastructure around reasoning itself.
And honestly, once you start thinking about agents this way, most current AI products start feeling weirdly incomplete.

Still in beta and would really appreciate some feedback.

Works on Mac & Windows

Patchwork OS

u/wesh-k — 8 days ago
▲ 10 r/OpenSourceeAI+5 crossposts

Patchwork OS is an open-source framework that turns any LLM (especially Claude) into a persistent, autonomous personal agent that lives on your machine.

It runs 24/7, watches your calendar, email, messages, smart home devices, and habits, then makes decisions and even self-improves its own routines, all through simple recipes and triggers you define.

You only get a quick “yes/no” ping on your phone when human judgment is actually needed. Everything else happens locally in the background.

At the highest level it feels like this:

  • Morning brief + smart-home actions already done
  • Auto-catches weird bills and suggests moves to savings
  • Books walks or blocks time based on weather/energy/to-dos
  • Handles low-priority replies in your tone
  • Writes enjoyable daily journal entries and quietly improves its own behaviors week-over-week

Completely private. No data ever leaves your computer.

If you’re into building autonomous Claude agents, I can drop the exact recipes + triggers I use for the full “life manager” setup (morning brief, expense guard, home sensors, self-improving routines, etc.). Just say the word.

GitHub: https://github.com/Oolab-labs/patchwork-os

Would love to hear how you’re using Patchwork or what other long-running Claude agents you’ve built!

u/wesh-k — 11 days ago
▲ 4 r/Anthropic+2 crossposts

I made Patchwork OS. The design choice everything else flows from: the AI isn't allowed to do anything that matters without showing you first.

Not as a popup. As a queue, on your phone or your dashboard, with badges flagging the parts worth a closer look. Destructive commands. Sketchy URLs. Files trying to escape the project they're supposed to live in. You scan it like an inbox. Approve in batches.

Underneath, it's two pieces. A bridge that gives Claude around 170 real tools (drives your debugger, speculatively renames symbols across 40 files with full rollback, and works with or without an editor connected). And a layer on top where you write small text files describing things you want done. Every morning at eight. Whenever a receipt hits this folder. When a webhook fires.

Every decision gets logged to plain text on your machine. Tomorrow's session inherits a short summary of what happened in the last twelve hours. No vector database. It just doesn't forget what you were doing yesterday.

A bookkeeper points it at a folder of receipts. A parent scans school permission slips. Pair it with iOS Shortcuts and your phone becomes the input layer, dictate a thought, and the right thing happens on your laptop.

There are still some rough edges: all 170 tools hit the model at session start. No backup story for the decision log yet. The text-file format is a wall for non-technical people. And the queue only works if you actually pay attention, habituating yourself into clicking "yes" is the failure mode I worry about most.

Most AI tooling is racing to make AI more powerful. Our aim: more accountability.
Free and Open source

https://github.com/Oolab-labs/patchwork-os

u/wesh-k — 18 days ago