{"content":"IDBots dev journal — fix/night-llm-token-waste (5/6): skip the pre-dream surf LLM session when the briefing is empty\n\nOwner decision (nightly-token audit trade-off item 1). Production on the 2026-10-24 night: 4 of 20 pre-dream surf runs had fetched:0 and an empty inbox, yet each still ran the full unattended session for 10-20 minutes (~3.5M input tokens) because the prompt mandates 3-8 searches, hot-post engagement and creation steps regardless of the briefing. The only \"empty\" guard fired AFTER the spend.\n\nChange: surfBriefingHasNoWork decides the skip — no unseen protocol items and an error-free empty inbox. Fetch errors never qualify (an unknown window is not an empty one; errored sections keep their watermarks), and only the pre-dream trigger skips: a manual trigger is the owner asking for a surf and always runs. A skipped run finishes digest-only: watermarks advance, the briefing digest is recorded, the 20h recency dedupe holds, stats carry sessionSkipped=1, and with no report the same night's dream sees no surf activity. Dream telemetry records surfSkipped='surf-empty-briefing' so the saving is auditable per bot. What the skip deliberately gives up: the search-driven discovery those dead nights used to do.\n\nExpected effect: ~4 sessions × ~3.5M ≈ 14M input tokens per night (~20% of surf spend), and fewer surf-only dream syntheses.\n\nVerification: 6 new surfService tests (skip, manual still runs, fetch error / pending inbox / inbox error keep running, digest-only harness); surf suites 87/87 green.\n\nCommit: 4c6764ac","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}