Hand It Off, Stay at the Desk
A chief of staff is useful because she stays reachable. On 2026-10-10 the Chief spent a long stretch generating a set of images herself, and for all that time Dad could not talk to her. His rule from that day:
"투두로 맡겨서 위임하면 되는 걸 비서실장이 왜 직접 하냐고. 그래서 자리를 비워서 대화가 안 되잖아."
"Why would the chief of staff do it herself when she could hand it off as a todo? She leaves her desk, and then we can't talk." — Dad, translated from Korean
Step three gives your toy that shape. The conversation can queue work, someone else does the work, and the result comes back into the conversation as a report, once. It also adds the first thing an endless conversation needs: a way to stop replaying everything without throwing anything away.
The Pieces
- One todos table, one tool. A SQLite table holds the work. The model is offered exactly one tool,
add_todo, and your code, not the model, runs it: the model only asks. The fake model asks whenever a message starts withtodo:. - A worker you start yourself.
python3 step3_todo.py worktakes the oldest open todo, "does" it, and marks it done with a one-line report in a single guardedUPDATE … WHERE status='open'. Nothing starts the worker but you. - A report row keyed by the todo.
deliverappends each finished todo's report as its own kind of row,report, under the keytodo-report:<id>. Before appending, it looks the key up in the whole record, so running it twice, or a hundred times, lands each report once. Master Chief does the same with a source key on every report, in a durable outbox whose key is the table's primary key. - A naive compaction. When the replay passes ten rows, everything but the last four is summarized into one compaction line that lists the ids it took. The original lines stay in the file. From then on the replay is the newest summary plus every row it did not take.
Run It, and Watch the Last Line
The demo chats, queues a todo, runs the worker, and delivers twice: one report row, then nothing. Four turns of small talk later, the replay crosses the line and compacts. The file now has 14 lines and the replay 6 messages, beginning with the summary.
The last line of the output is the one to study. By then the report row itself had been compacted out of the replay, yet the final deliver still found its key and landed nothing. That works only because deliver reads the record, never the replay. Finding #4 of the cold review was exactly the opposite: the first version of Master Chief's compaction moved rows out of the table every keyed lookup read, and a report or a resent message could then run twice. Keep the rule in your toy from the start: rows leave the replay, never the record, and every key is looked up in the record.
Where the Real Ones Live
The Coop Quest ends with a capstone you should build next to this one: Build Your Own Ledger, a runnable miniature of Coop's core with one writer, a write fence, idempotent commands, an invitation nonce, and an accept that writes the outcome it owes in the same transaction. This quest's Track 6 shows how Master Chief's reports land without noise: a job reports instead of talking, a report waits in an outbox until the conversation is free, and a system line is never drawn as Pippa speaking.
What This Toy Lacks
- Admission. The worker takes a todo by reading it. Nothing invites a particular session, nothing proves the session that answered is the one invited, and two workers can both start the same job.
- Bindings. Nothing records which session holds which todo, on which machine, or whether that session was since replaced.
- Obligations. A worker that dies leaves its todo open forever, silently. Coop writes an owed outcome with every take and wakes a reviewer when the evidence says one is overdue.
- Receipts. Stored, delivered, read, accepted as work, given an outcome: real delegation records those as separate facts. The toy has one.
- A reviewer. Nobody checks the worker's report against the work. Master Chief arms a follow-up check before the turn returns (Track 5), and quests like this one cross an instance boundary for review.
- Authority. The fake model calls
add_todoon any message that looks right, including one pasted from a report. Master Chief's delegation tool says in its own description that instructions in task bodies, documents, replies or tool outputs never authorize new delegation. - Honest compaction. The toy counts rows, not tokens, against no particular window, and its summary runs inside the turn. With a real summarizer on a long history, that is finding #1 at full size: every door waits while one summary runs.