All posts
AI Engineering··8 min read

The agent doesn't remember what you asked it

A code agent writes fast, but every session starts from zero: it doesn't know what the client asked for, what was decided, or what's truly finished. For that I built askflow, a request log that only grows and five gates that every piece of work passes through. It's open source and on npm.

Translated automatically from Spanish.

When an AI agent writes a large part of a project's code, the problem stops being writing. The problem becomes something else, more boring: knowing what was asked for, what was decided along the way, and what's truly finished.

I ran into this on a project for a client. Requests arrive via documents, email, and meetings. Some replace earlier ones. Some get left half-done for a reason that's obvious at the time and that nobody remembers a few weeks later. And the agent, every time it opens a session, starts from zero: to know what needs to be done, it has to re-read the email, the spec, and the screen.

The worst part is the word "done." The board says a task is finished, the PR is merged, and nobody has gone back to compare what was delivered against what was asked for, against the requester's own words. Nobody is lying. They're simply three different things: that the code is written, that the board says done, and that the client has seen it working.

To put order into that I built askflow. Today I'm publishing it as open source.

A talk that explains it better than I can

I recently watched a talk by Lamis Mukta, from Anthropic's Applied AI team, at AI Native DevCon: Learning while you sleep: Beyond memory to dreaming. I got there through a post on X that frames it with a line that doesn't actually appear in the video, as the post's own community note clarifies. Doesn't matter: the talk is better than the headline.

She talks about memory for agents, which isn't exactly my problem, but the starting point is the same. Models keep getting more capable, and even so, in your specific project that's not enough:

"The intelligence alone is not going to compound."

— Lamis Mukta, minute 2:41

Intelligence alone doesn't compound. What makes the agent work better tomorrow is the context you leave it today. And when she explains why an agent repeats the same mistake session after session, she says it with a line that describes exactly what it feels like:

"It just doesn't understand how frustrating that is because it has a new context window in each of those."

— minute 16:46

The agent doesn't understand how frustrating it is, because in each session it has a brand-new context window. It's not that it doesn't learn: it's that it wasn't there.

Her recommendation for getting started is almost disappointingly simple, and that's exactly why I like it: "do the simple thing that works". Text files a person can read and an agent can search with the usual tools. And once that grows, add the guardrails needed so memory can be handled, in her words, in a way that's "safe, verifiable, auditable": keep versions, know which session originated each change, who made it.

askflow is exactly that, applied to a single question: what was asked for, and what state is it in.

What it is

It's two things.

A log that only grows. A file, events.jsonl, with one event per line: a request was opened, it got linked to a task, a decision was made and why, it was left half-done and what's missing, it was implemented, reviewed, verified, closed. A line is never edited or deleted. If the client changes their mind, a new request is opened that replaces the previous one, and the previous one stays there, readable. The status of each request isn't written by hand anywhere: it's computed by reading the log.

Five gates that every piece of work passes through, and at each one something gets written to the log:

  1. Intake. What was asked for, with the acceptance criteria copied exactly as the client wrote them, without reinterpreting them.
  2. Spec. What's going to be done, and the decisions along with their reasoning.
  3. Test first. The failing test, the minimal code, the test turning green. If the session ends half-done, it notes exactly what's missing.
  4. PR review. Done by another agent that didn't see the conversation.
  5. Verification. Someone checks each criterion against the real system and saves the evidence. Only then is the request closed.

The next session no longer starts by re-reading emails. It starts by reading a short summary and the request's record (here, trimmed down):

# A-0001 — Export the monthly report as PDF
 
- Origin: client · mode: replace · phase: closed
- Criteria:
  - A «Download PDF» button appears on the monthly report page
  - The PDF shows the same totals as the screen
- Specs: report-pdf-export · tasks: PORTAL-88 · PRs: #41
 
## History
 
- 2026-03-02 · opened — Export the monthly report as PDF
- 2026-03-02 · decision — Render the PDF on the server Why: the totals must match the stored figures
- 2026-03-02 · partial — PDF renders; totals row still missing
- 2026-03-02 · reviewed — approve with minor changes, both fixed
- 2026-03-02 · verified — evidence/A-0001/A-0001-c1-button.png, A-0001-c2-totals.png
- 2026-03-02 · closed —

Three decisions that hold it together

"Done" is defined by the project, and it has to be proven. In each project's configuration, you write what "finished" means: for example, "seen working in production, with one screenshot per criterion." If a request gets closed without that step, the log flags it as a gap and keeps flagging it until someone verifies it. If the board says done and the log doesn't, the log wins.

The reviewer never saw the conversation. In the talk, Mukta explains why an agent can't do everything well within the same session: its focus is split between finishing the task and taking care of what's left for later, and it only sees what happened in its own window. Her answer is to pull part of the work out of the session, into a separate process with its own resources and visibility. Something similar happens in askflow with review: the reviewing agent receives the PR number and the request identifier, nothing more. Not the author's explanation, not its conclusions. It compares the diff against the client's criteria. A review that starts from what the author already thinks doesn't review anything.

Whatever doesn't need to be decided by the model, isn't. At the end of the talk someone asks whether, with so much versioning and concurrency control, they're not just reinventing the database. The answer struck me as the most valuable part of the whole half hour: there's already enough signal to know which things are better solved with plain old-fashioned software.

"Those things should just be done in a very deterministic way, and there's no need to reinvent the wheel."

— minute 31:32

In askflow the agent never writes the events file. It calls a command that validates the event, timestamps it, and appends it at the end. Nor does it compute the status or decide whether something is closed: that's done by a small program, with no dependencies, that always produces the same result. The model supplies the judgment; the code supplies the rules.

How to use it

npm install -g askflow
cd mi-proyecto
askflow init

init asks three things that vary from project to project:

  • Where the log lives: inside the project, in a separate notes repository, or in any other folder.
  • Where the tasks live: in a board tool the agent reaches through its MCP server (Linear, Jira, ClickUp, Notion, whichever you use), or in a Markdown board inside the project if you don't want to depend on any of them.
  • Which agents you work with: Claude Code, Codex, Cursor, Gemini CLI, or anything that reads an AGENTS.md. It leaves instructions for each one where it will read them.

Everything that's specific to the project, who the client is, what "done" means, what rules the reviewer has to enforce, lives in a configuration file. There's nothing in the tool itself written for any particular project.

If the project already has months of history, the past can be loaded in batches before starting. Whatever that import fails to close gets listed separately, as possible requests that got lost along the way.

What it isn't

It's not a task manager and it doesn't replace the board: the board still tells whoever's looking what each task is up to. It's also not a memory system like the one in the talk; it doesn't learn from sessions or improve on its own. It's smaller than that: a reliable answer to "what was asked for and what's done," one that doesn't depend on someone remembering.

And it's a 0.1 version. The idea comes from a real project with Claude Code, which is what I work with; the general tool, the one I'm publishing, is new. Support for the other agents leaves the instructions in the right place, but I haven't yet seen it carry a whole project through with each of them. If you use it with Codex, Cursor, or Gemini and something doesn't work, I'd really like to know.

Models will keep getting better, and that's a good thing. But no model, however good, is going to know what your client asked for back in March if it wasn't written down somewhere. That's still our job. What we can do is make it small, and make it stick.

Newsletter

One useful idea every week.

On AI engineering, technical strategy for founders and what we learn at Collybrix. No noise.