Skip to content
Writing
Thread

Workflows are the answer to the Memento problem

The same model can be a slop cannon or a polished professional depending on which incantations you mutter at the start. It makes a lot more sense once you realize every agent is Leonard from Memento: brilliant, fully capable, and starting from zero every single time.

AIBuilding15 posts
01

Workflows were the turning point in my AI journey. It seems silly that the same model can be a slop cannon or a polished professional depending on which incantations you mutter at the start of a request. It makes a lot more sense once you understand that workflows are the natural solution to the Memento problem.

02

If you haven't seen the movie, Leonard can't form new memories. Every few minutes he comes to with no idea what just happened. He hasn't lost any of his faculties. He's lost continuity.

That's every agent you've ever worked with. Brilliant, fully capable, starting from zero every single time.

03

Which is why "the model got dumber this week" is usually the wrong diagnosis. It didn't get dumber. It just has no idea what you two figured out yesterday, or 40 turns ago, or in the session running in the other worktree.

04

Leonard's solution isn't to fight his amnesia, which is a fool's errand. He builds a system outside himself. Polaroids, notes on the back of them, and tattoos for the things that absolutely cannot get lost. He can't remember 15 minutes ago but he creates a system so it doesn't matter.

That's context management. You start the session with the right context and the agent gets what it needs done.

05

But there's still a limitation, and (spoiler alert) Leonard's downfall is that there's no continuity. He's pursuing a goal but each step is an ad-hoc reaction to the previous one. He's taking everything in 15 minute chunks with a tiny bit of help from the last period.

That's not too different from how most people work with agents. Workflows are the answer to that.

06

A workflow is just breaking execution into discrete steps. Plan, implement, review, verify. Each step gets its own context, its own instructions, and its own definition of done. The arc exists outside any one session and you make sure each step is small enough to fit within a context window.

If you've ever used plan mode you've already started. That's a two stage workflow. Most people just stopped there.

07

Workflows solve the amnesia problem, but there's a second problem they fix as well. Agents are terrible at holding divergent objectives at once. Try telling one to write good code, make the test suite thorough, and be efficient about it.

One objective usually wins out and none of them get properly completed.

08

Split across steps there's nothing to balance. The implementer optimizes for working code. The security reviewer only cares about what could go wrong and gets to be as paranoid about it as it wants. Nobody is negotiating with themselves.

09

Agent personalities are also weirdly malleable, which cuts both ways. Uncontrolled it's a bug, assigned it's a feature.

A step that's labeled review, with review instructions and none of the implementation baggage, is in a genuinely different mood than the one that just spent an hour writing the code.

10

Which is where the amnesia flips from problem to asset. A reviewer with no memory of writing the code is a better reviewer. No ego in the diff, no sunk cost in the approach. It's not tempted to get a test to pass by changing the test instead of fixing the code. The forgetting stops being something you work around and becomes something you assign.

11

The darker lesson from the movie applies too. Leonard gets played precisely because nothing checks his notes. He trusts the tattoo because it's a tattoo.

Same failure mode. Agents will enthusiastically follow the context they're handed unless they're explicitly told to be skeptical. You don't want every single step constantly questioning the ones before, but a well placed adversarial reviewer in a workflow up-levels the whole system.

12

My usual workflow has 21 stages. I know how that sounds.

But I'm not optimizing for tokens, I'm optimizing for my attention, and those are very different budgets. Tokens are cheap and getting cheaper. Me needing to go through my third review loop at 11pm because nothing upstream caught the issue it is not.

What that crazy workflow buys me is being able to walk away for hours, sometimes days, without checking in, knowing there will be something halfway decent waiting for me when I get back.

13

Now there's one place I stretched the truth here. One of the reasons agents have gotten so much more capable is that these workflows are built into the harness itself. You might not see them anymore but you're running workflows. Use Claude Code and Claude figures out which planning and verification loops it needs and runs them in the background.

There's a problem with that though. You're counting on the same models that are bad at ambiguity to adjust the workflow on the fly.

14

How much workflow you need depends entirely on the task. A one line fix doesn't need a review board. Sometimes short and sweet is plenty, sometimes you want the whole apparatus. What you're actually tuning is how much you care about this particular output.

There's a limit to how far you can trust an agent to adjust that dynamically and so the only solution becomes to hand back control to you more frequently.

15

That's why taking control of my workflows was the first major unlock for me. They're the gateway drug to autonomy and they felt like they opened a whole new horizon. When sessions started running for hours, I suddenly had time for a lot more of them. Eventually they took me down a rabbit hole that ended with me building a whole product just to make them easier to run. Because they're Thor's hammer and yet, in my experience, most people are barely using them.

Originally on Threads