Sous is an agent that runs unattended on three schedules and lives entirely in email: it sends a proposal, and whatever one person writes back becomes the plan. Dinner is what it plans, but the engineering problem is a human-in-the-loop protocol that has to survive being answered in half a sentence, contradicted, or ignored.
Sous makes a decision, emails it to a person, checks back later, and treats whatever came back as the instruction, including when the whole answer is drop 2 and 4, more chicken. That puts it between two ways of failing: never asking anything means only doing work nobody needs to approve, and asking about everything is a form with extra steps.
Running every day constrains the rest of the design. A system that executes once can afford to be expensive, but one that fires on a fixed schedule with no end date cannot carry a per-call price, an interface someone has to log into, or an assumption that a human will notice the day it stops working.
The answer arrives as an email reply, which means it arrives with the agent's own message quoted underneath it, and a program reading the whole body has no way to tell the two apart.
The budget is a range rather than a ceiling: configuration carries a minimum and a maximum, and the program refuses any configuration where the minimum sits above the maximum. A list that comes in under the floor misses the band exactly as much as one that goes over the top.
Nothing supervises the agent, because there is no dashboard and no operator. A failure on a Tuesday is a Tuesday with no recipe, discovered by the person who was expecting one.
The schedule is three separate jobs rather than one, each registered with launchd, the macOS service that starts programs at set times with nobody present. Sunday at 08:00 the first emails five proposed dishes, numbered. At 08:15 the second opens the mailbox, looks for an answer, and sends back a grocery list grouped by aisle with a running total. At 07:00 on weeknights the third sends that night's recipe.
Splitting the reply reader into its own job is the part worth pointing at, because the proposer never waits: it sends and exits. Whether an answer has arrived is a question asked fifteen minutes later by a different process, so nothing is ever parked waiting on a person.
Weekend nights are left flexible and built from whatever the week did not use up, since the grocery module can report leftover ingredients. The package comes to about 2,600 lines of Python across 18 modules, and 9 test modules exercise it.
An email reply is the human's sentence followed by the agent's own message repeated verbatim, all five numbered dishes included, so strip_quoted cuts the quoted portion away before anything else reads it. Without that step the agent takes its own proposal for an instruction, which makes it the least interesting function in the project and the one everything else depends on.
What is left is a sentence like drop 2 and 4, more chicken, and parsing it means turning that line of ordinary English into fields a program can act on: two dishes removed by position, plus a preference applied to whatever fills the gaps.
Keeps and drops then arrive as two lists that do not always agree, because a reply can contradict itself or name only three dishes out of five. _resolve takes the keep list, the drop list, and a count, and reconciles them into one consistent set, so an incomplete or self-contradicting instruction still produces a plan instead of an error.
A second parser never calls the model at all: parse_manual reads the reply with plain rules written directly in code, and it is the path available when the model path is not.
Two recipes want chicken, one asking for a pound and the other for eight ounces, and those belong on the list as a single line. Producing it means converting between units from the same family, weight against weight and volume against volume, which is what _merge_across_unit_families does. When it goes wrong nothing raises an error, just chicken on the list twice or a quantity half of what the week needs.
Staples below a threshold quantity are dropped, on the assumption that the kitchen already has that much salt or olive oil.
Prices come out of a cache that learns, and every entry records where its number came from: estimated means the model was asked and guessed, confirmed means a real receipt was seen. An ingredient with no price on file gets one by asking the model, and the answer is written back so it is not re-guessed the following week. Confirmed prices outrank estimates, so the running total is part observation and part guess, every component marked as one or the other, and that total has to land inside the band.
The agent shells out to the Claude CLI in headless mode, running the same command-line tool a person would type in a terminal but non-interactively: the prompt goes in as an argument, the answer comes back as text. There is no API key anywhere in the system and no per-recipe cost, because it runs on a subscription that already exists. Metered API calls were the alternative, and the daily schedule is what ruled them out.
There is no app, no dashboard, and no notification to ignore. The inbox is somewhere the human already is, so the agent has a mailbox of its own: it sends over SMTP, the protocol for outgoing mail, and reads replies over IMAP, the protocol for reading a mailbox kept on a server, both authenticated with a Gmail app password. A small web interface would have been more capable, and it would also have added one more place to remember to go.
Nothing in the schedule verifies that the configured model can do the jobs the schedule assumes, and an unattended agent that has never demonstrated it can generate a recipe and parse a reply is a scheduled failure with a start time. doctor is a registered subcommand that exercises the model on those jobs directly, and its help text states the scope exactly: check the configured model can do every job.
Sous is running daily. The three jobs are installed and firing on their own schedules, and the loop closes without anyone starting it: proposal out, reply in, list back, recipes through the week.
Nothing has broken yet, and it is too new to have broken.
The piece that improves without being worked on is the price cache, where a confirmed receipt replaces the guess for that ingredient and the replacement holds.
Nothing here has been measured, so the claim is about what the system demonstrates rather than anything it has produced: a loop that runs across a week with nobody driving it and still does what the person asked, answered the way people actually write instructions, short and positional and half implied.
Recipes, aisles, and units of measure are the only parts that apply to dinner alone. Strip them out and what remains is the protocol: one job proposes and exits, a second reads the free-text answer later and reconciles it against what was proposed, and a plain-rules parser stands by for when the model is unavailable. The cache records which of its prices it was guessing at, the budget is a range rather than a limit, and doctor confirms the model can do the work before the schedule assumes it can.
← All projects