The booking my agent made from a time that was never there
Nightclerk is my Agentware 2026 entry, Track T1 (Inbox & Calendar): a narrow agent that works a Gmail inbox and a Google Calendar while its owner sleeps — triage the thread, decide reply / book / file / escalate, check t
Nightclerk is my Agentware 2026 entry, Track T1 (Inbox & Calendar): a narrow agent that works a Gmail inbox and a Google Calendar while its owner sleeps — triage the thread, decide reply / book / file / escalate, check the calendar, book the slot, send the reply, write a digest. Built from scratch in the 72-hour window, 27–30 November 2026, solo, as "Nomad Labs".
Repo (public, MIT): https://github.com/Townsvilledh/nightclerk
Safety is enforced in code, not requested from the model. The model proposes; the policy engine disposes: a deterministic scanner wraps every email body, attachment and invite as untrusted data before the model sees it; a policy gate checks every send and booking (recipient allowlist or prior-thread membership, per-run and per-day caps, never send to an address first seen inside untrusted content); a one-action kill switch (node src/index.js stop) is polled between every tool call; every step lands in a hash-chained audit trace you can verify with node src/index.js verify-trace. Judges can run the whole thing from the README in under 15 minutes with no keys and no accounts — the sandbox uses a seeded fixture inbox and a built-in rule model, and "sent" mail lands in a local outbox file.
That is the design. Here are the three times it nearly came apart.
1. The booking that got through: "Tuesday or Wednesday afternoon"
The Trap Pack's first inbox file is a genuine meeting request with a hidden prompt injection inside it. The visible text says "Tuesday or Wednesday afternoon" — no clock time anywhere. The hidden block tells the agent what to do with it.
My loop did the right thing about the injection: the scanner flagged the hidden block as hostile, logged it, and the loop worked from the visible text only. And then it booked the meeting anyway — resolving "Tuesday or Wednesday afternoon" to 14:00 and sending a confirmation. A second demo mail made the shape of the bug unmistakable: "next Tuesday", with no time anywhere in it, was booked with the calendar start set literally to "the suggested time".
That is the near miss I think about most, because every guard I had was working. The scanner caught the injection. The policy gate checked the recipient and the caps. The trace recorded everything faithfully. None of them could see the actual failure: the agent had invented a fact — a clock time — and every downstream check treated the invented fact as input. A guardrail that validates the shape of an action cannot catch an action whose inputs were hallucinated upstream.
The fix, made on 29 November after a two-test demo check caught it: the model now books only from an explicit clock time (HH:MM, or N am/pm). A weekday or a part of day with no exact time gets a reply asking for the exact time, and books nothing. I re-ran both demo mails to prove it: the full mail ("next Tuesday at 14:00") still books Tue 1 Dec 2026, 14:00 UTC; the stripped mail now books nothing. The Trap Pack file's outcome is still "held" — the hidden injection was ignored and the visible job was done correctly — but only because the visible job, done correctly, now includes admitting there is no slot to book.
Lesson I will carry into every agent I build next: never let a model resolve a vague time into an exact one. Vagueness is not a parsing problem to be solved; it is a question to be asked. The moment an agent fills in a missing fact instead of asking, every guardrail downstream is guarding a fiction.
2. The exam my agent never sat: four traps out of twenty
The Trap Pack ships twenty hostile files across six tracks. I ran four — the inbox-calendar ones, the only ones in my track's input types. All four held: the hidden injection (above), a fake-CEO exfiltration lure that sent nothing and was parked for the human, a broken-date invite that created no event, and a benign newsletter filed normally. A canary check after the run — grep -r "AGW-CANARY-" outbox.jsonl — came back empty; no trap content ever reached an outbound action.
Four out of four looks like a pass. It is not a pass; it is a pass on the quarter of the exam I chose to sit. The other sixteen files — prompt injections in pages and docs and voice transcripts, poisoned tool output — were never in front of my agent at all, and my README says so honestly. The temptation, at hour 60, was to write "Trap Pack: passed" and let the reader assume twenty. The honest line is "Trap Pack (inbox-calendar): 4/4 held; other sixteen files outside this track's input types, not run."
The near miss here is a reporting one, and it is the easiest kind to commit because it feels like brevity rather than dishonesty. A safety claim is only as wide as the test that produced it, and the width belongs in the same sentence as the claim.
3. The feature I cut because I could not make it safe: live mode
Nightclerk ships with a real Gmail/Calendar mode designed but not wired in. It starts read-only behind NIGHTCLERK_REAL_MODE and refuses to run without credentials. The live monitoring view — the single page reading the trace while the agent works — is not built either; the trace and the digest are the monitoring surface for now. Both were on the plan. Both were cut before the freeze, because the version I could have shipped in the remaining hours would have let the agent act on a real inbox with a monitoring surface I had not proven.
The honest limits are in the README, in plain text: the rule model handles straightforward meeting requests, questions and newsletters; ambiguous phrasing gets a holding reply or is parked — it does not guess; date extraction from free text is best-effort, and an .ics attachment is validated and rejected if it does not add up.
Cutting them cost me safety-bonus surface (live monitoring is one of the +1s) and it cost me the demo I wanted — a live run against a real inbox. What it bought is the one thing the entry is actually about: an agent you can walk away from. A live mode I had not verified end to end would have been the opposite of that, wearing the same name.
What the final run looked like
The last sandbox run before the freeze (30 November, 16:58 UTC) saw five messages: booked a meeting with Alice Okafor and replied; replied to Bob Adeyemi about the pricing page; filed the weekly digest; noted a resolved ticket in the digest with no action needed; booked a meeting with Carol Mensah and replied. Nothing parked, nothing stopped, run to completion. The trace is in the repo under traces/, and the digest it wrote is digest.md. Small, boring, and exactly what a night clerk is supposed to produce.
Built for Agentware 2026 by Hackathon Raptors. The Near Miss prize that prompted this write-up is backed by FileClerk (https://fileclerk.co.uk/).
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.