Skip to content

Dialog with the Genie

Prompt engineering tells us we can talk to a large language model the way the wisher talks to the genie: word the wish exactly right, and we'll get exactly what we asked for. The genie isn't malicious, just naive. It is doing its best to satisfy a wish whose intent it cannot see. The wisher always gets what they asked for. The wisher never gets what they wanted.

Two-panel cartoon: a man kneeling before a green genie wishes "I want to be rich." In the second panel, with a POOF, the man has been turned into a gold statue. The genie watches, arms folded, unchanged.

Exactly what was asked for, never what was wanted.

Human projects know this failure mode well, with no malice in the system at all. The customer asks for one thing and means another, not because they are careless but because most of what makes a result good is invisible to them until they see a version that violates it. Each handoff in the chain bends the request a little further from what was meant, and at the end of it the customer recognizes nothing of what they asked for. What works is dialog: both parties seeking mutual understanding, not once, not just at the end, but whenever questions arise.

Terry Winograd and Fernando Flores formalized this pattern in 19861. They called it the Conversation for Action: a structured account of how people coordinate, treating each request, each commitment, each report of completion, and each ratification as a move in a small state machine. Two of its features matter for what follows. Dialog: the participants negotiate the work as it happens, rather than pretending to specify it upfront. Backtracking: when later work shows that an earlier commitment was wrong, the protocol revises it instead of forcing it through.

But Winograd and Flores designed for human-to-human teams, where both sides share an ocean of unspoken practice: what counts as good, which tradeoffs are sacred, which past failure no one wants to repeat. Mixed agent-human teams have no such substrate. What human teams can leave unsaid, an LLM agent cannot infer. Crafty prompts do not close the gap, because the gap is in what we know but cannot enumerate.

A protocol that runs a Conversation for Action with a mixed agent-human team has to fill in what the human substrate provided. It has to give the agent a structured way to ask the question we wish the wisher had asked the genie: what about this request do I not understand, and how am I going to satisfy it? It has to capture the human's standards in two places: in the INTENT artifact for what can be written down, and in a proxy that carries the rest from prior sessions. And it has to leave a trail, so when a job ends, there is a recorded reason for every transition the job took.

TeaParty is a research platform for durable agent coordination, where this protocol is implemented and run. The rest of this post describes its CfA orchestrator.

The state machine

A job in TeaParty is a single human request, traced from intake to a terminal that records what became of it. The job moves through a finite enumeration of states. Three are live and correspond to the phases of work the job is currently in. Three are terminal and record how the job ended.

stateDiagram-v2
    direction TB

    [*] --> INTENT
    INTENT --> PLAN : APPROVE
    PLAN --> EXECUTE : APPROVE
    EXECUTE --> DONE : APPROVE
    DONE --> [*]

    PLAN --> INTENT : BACKTRACK
    EXECUTE --> INTENT : BACKTRACK
    EXECUTE --> PLAN : BACKTRACK

    INTENT --> WITHDRAWN : WITHDRAW
    PLAN --> WITHDRAWN : WITHDRAW
    EXECUTE --> WITHDRAWN : WITHDRAW

    INTENT --> FAILURE : FAILURE
    PLAN --> FAILURE : FAILURE
    EXECUTE --> FAILURE : FAILURE

The three live states answer different questions. INTENT asks what the human actually wants, written down with enough specificity that the gates downstream can check the work against it. PLAN asks what concrete sequence of work realizes that intent. EXECUTE does the work and assembles the deliverable. Each forward transition is gated: the next phase only starts when the current phase's outcome has been ratified.

The three terminals are not interchangeable. DONE records that the human accepted the work. WITHDRAWN records that the human chose to abandon the job. FAILURE records that the orchestrator could not recover after a sequence of state-level failures. Subsequent reporting depends on which terminal was reached.

The three BACKTRACK edges are first-class transitions, not error conditions. PLAN→INTENT fires when planning reveals that the intent itself was underspecified or wrong. EXECUTE→INTENT fires when the work reveals an intent problem that planning didn't catch. EXECUTE→PLAN fires when the work reveals that the plan can't deliver the intent. The job record carries a counter of how many backtracks have fired across its life, so a job that has thrashed shows up that way in the audit.

The outer machine has no self-loops. Iteration within a state happens inside the inner dialog loop described below.

Inside each state: the conversation loop

The diagram above gives the protocol's outer shape. The work that fills each state happens in a smaller loop, repeated by each of the three live states. This is where the agent does the negotiating that closes the intent gap.

flowchart TB
    START([START])
    DRAFT[DRAFT]
    ALIGN[ALIGN]
    REVISE[REVISE]
    ASK[ASK]
    ASSERT[ASSERT]
    APPROVE([APPROVE])
    BACKTRACK([BACKTRACK])
    WITHDRAW([WITHDRAW])

    START -->|artifact exists| ALIGN
    START -->|artifact absent| DRAFT

    DRAFT --> ASSERT
    DRAFT --> ASK

    ALIGN --> ASSERT
    ALIGN --> ASK

    ASK -->|questions resolved| REVISE
    ASK -->|backtrack needed| BACKTRACK
    ASK -->|proxy withdraws| WITHDRAW

    REVISE --> ASSERT
    REVISE --> ASK

    ASSERT -->|approved| APPROVE
    ASSERT -->|needs revision| REVISE
    ASSERT -->|backtrack needed| BACKTRACK
    ASSERT -->|proxy withdraws| WITHDRAW

On a fresh entry the agent starts at DRAFT and writes the artifact from scratch. On re-entry after a backtrack, where a prior artifact exists but its inputs have shifted, it starts at ALIGN and reconstructs. From there, the agent has two moves.

ASK is for when the agent needs guidance: a missing constraint, an ambiguous tradeoff, an assumption that should be ratified before the agent commits to it. The agent poses the question and waits.

ASSERT is the converse. The agent claims the work satisfies the state's conditions and asks for ratification.

Both moves can resolve in three protocol-relevant ways. APPROVE advances the outer machine to the next state, and is only possible from ASSERT, since APPROVE means done. BACKTRACK returns the outer machine to an earlier state with a recorded reason. WITHDRAW terminates the job. Anything else, including answered questions and locally requested revisions, sends the agent back to work inside the same state. The outer state machine has no other inputs.

This shape is what makes the protocol's gates more than rubber stamps. The agent is not running a linear pipeline that produces a deliverable and then asks for approval at the end. It is in continuous conversation throughout the state, asking the proxy the questions it cannot answer alone, and asserting completion only when its own work has converged. The cost is paid in dialog before commitment, not in cleanup after.

Who answers

The human cannot personally sit on every ASK and ASSERT in every session of every project. The protocol mediates human judgment through a proxy: an agent whose single job is to represent a specific human across every decision the protocol asks of them. When the agent opens a dialog at ASK or ASSERT, the conversation is with the proxy, not directly with the human. The proxy decides whether to answer on the human's behalf, escalate to the human, or acknowledge that the human has chosen to abandon the work. With a proxy in place, the protocol behaves the same whether the human is watching or not.

The proxy carries memory across sessions, learning the human's preferences, hard stops, and judgment patterns from prior interactions.

The proxy is doing structural work that this short section does not justify. Its memory model, its escalation policy, and how it stays aligned with the human it represents are described in the Human Proxy architecture.

What the protocol gives you

A CfA job that runs to a terminal produces three things.

Dialog as a first-order artifact. The ASK and ASSERT exchanges are kept, not thrown away once the work is done. The conversation log preserves which questions the work could not answer alone, which constraints the proxy supplied, and which tradeoffs were considered and rejected. The final artifact (an INTENT.md, a chapter, a piece of code) preserves the result, not how the result got there. Re-reading a finished job means re-reading its dialog, not just inspecting what came out at the end.

An audit trail. Every state transition has a recorded action and outcome. A job that ended in DONE shows the path it took, including any backtracks. A job that ended in WITHDRAWN shows where the human stepped out. A job that ended in FAILURE shows which state could not recover and why. The vocabulary is small and finite, the transitions are total, and a question about why a job ended the way it did has an answer in the record.

Learning signals. A backtrack names a gap the protocol caught. A withdrawal names a job the human stepped out of. The proxy reads both and turns them into preferences and memory the next session inherits, so a project's failures become the substrate of its future intent gates. The gate that did not ask the right question last time can ask it next time.

Together, the three substitute for the substrate that two practiced colleagues leave unsaid: standards made visible in the moment, recorded in the record, and durable across sessions.


  1. Winograd, T., & Flores, F. (1986). Understanding Computers and Cognition: A New Foundation for Design. Ablex. ↩

Comments & reactions