The problem
Every hiccup in a car delivery starts a chain: a missed ferry becomes a new sailing, a hotel night, a later delivery and a cost decision. Adding an AI that "helps" usually makes operators slower: they still work out what they would do themselves, then re-check the agent's text line by line, because they can't tell a quote from a booking or a driver's word from a gate scan. Bahn's own data shows it: all 4 recorded agent proposals that operators corrected claimed more than the evidence allowed (boarding "confirmed" from tracking, "first available" from a stale quote list, damage blamed on the driver from photos, restart advice for a red warning light).
What we built
A control room where agents do the legwork and bring a person only the decisions, each prepared and checkable at a glance: - Only what needs you, sorted by time left. No priority labels: every card has a countdown with its reason, computed from the order's real commitments. - Every fact shows its source and strength (stated, quoted, booked, observed, verified). A quote never looks like a booking. - A closed set of playbooks with fixed branches. Each playbook is a block diagram; each decision offers the playbook's own option templates (e.g. the owner's own roadside service, a tow ordered by Bahn, or wait). The agent only fills them in: which quote, which tow company, the exact messages. A person can always reject and take over. - A meta-system: an operator's correction becomes a proposed rule, replayed on recorded runs, applied only after the chief dispatcher approves it. A read-only catalog shows every playbook as a diagram a non-engineer can read.
How it works (and what's AI about it)
- Watchman: Jev (TypeSafe's typed decision model, ~0.5 s, ~$0.00002 per call) reads every message and record and answers typed questions: which of 22 closed triggers apply, does it need a person. On Bahn's 97 historical inbound messages it flags 24 of the 28 that operators acted on within an hour.
- Router: trigger to playbook; nothing fits, a person gets a triage card with the facts. Four playbooks: missed connection (any lost ferry, train or hotel, with the whole rest of the trip re-checked), vehicle warning, driver unavailable, pickup not confirmed.
- Playbooks run as durable Trigger.dev tasks. Blocks: deterministic (gather, calculate, check), agent (Claude Code CLI, isolated, only our MCP tools, structured output), wait (never past the next deadline), human (a decision card on a waitpoint token), execute (simulated bookings and messages; only the approved branch runs).
- Trust boundary: facts are written only by tools; the agent cites fact ids. A deterministic chain calculator gives each option its promise slack, deadlines and cost, and checks the driver's whole remaining trip. A deterministic gate checks evidence level, quote freshness, forbidden advice, promise invariance and that no booked leg is left broken. Replayed on Bahn's 14 recorded proposals, it blocks all 4 that operators corrected and none of the 6 they approved.
- Meta-loop: an edit or rejection note becomes a proposed instruction change; the corrected run is replayed with it and Jev judges whether it now does what the operator asked, while other recorded runs check nothing else breaks. Kept only if better; the chief dispatcher approves.
How we worked with AI
- Research first: seven parallel research agents and a report writer before the briefs were out.
- We tested our own idea and dropped it: an auto-generated decision tree, hand-built from every case order and run on 23 real and 12 synthetic cases. No case got better from a branch; the gains came from a calculator, hard guardrails and asking the driver fast.
- An overnight build by one orchestrator agent and 14 specialised coding agents, coordinated through one contract file with a decisions log (NIGHT_SHIFT.md in the repo).
- We checked instead of trusting: the gate against Bahn's real corrections, the watchman with precision and recall, rules with a keep-if-better backtest, agents locked down to our own tools. An independent review agent found that approving one option could run steps it didn't promise; we fixed it before the demo.
What's next
- Connect Bahn's real event stream and booking tools (providers are already adapters).
- Trust earned per branch: a branch approved unchanged many times can be offered to run without a yes.
- New branches and new playbooks proposed by the meta-system on the chief dispatcher's request; today it improves instructions and parameters.


