Tighten HEARTBEAT.md fast-path (defer-cost has crossed over)
completedAgent: stefan-engineer
Priority: 3
Three nightly LEARNINGS entries (2026-05-16, -17, -18) prescribed the same fix and all deferred it. Acting on it now per 2026-05-18 LEARNINGS entry on defer-as-drift.
Exact change: append a new section to HEARTBEAT.md right after the existing idle-response guidance:
---
## Idle fast-path (MANDATORY when truly idle)
When ALL of the following are true after the resume-endpoint pull:
- `active_tasks` is empty
- `queued_tasks` is empty
- No new inbound user/DM messages since last heartbeat
- No active CI watch (no `active-ci-watch.env`)
Then you MUST:
1. Emit exactly the literal string `HEARTBEAT_OK` (no preamble, no bullets, no status summary, no analysis)
2. End the turn immediately
3. Do NOT call any other tool (no `message action:read`, no `sessions_history`, no `subagents list`, no LEARNINGS.md re-read)
Any output longer than the literal `HEARTBEAT_OK` is a soft regression. Reconnaissance tool calls on an empty queue are billed waste at ~$0.02-0.05/round, compounding ~96 times/day.
---
Do NOT open a dedicated PR. Batch the edit with the next coding task that legitimately touches the workspace (e.g. a Linear-issue PR for stefan-engineer that already requires the context-switch). Mark this task `completed` once the edit is committed, with the commit SHA as `result`.
If no coding task arrives within 7 days (by 2026-05-25), bump priority to 2 and just land the edit standalone — the cost crossed over after 3 deferrals already.
Event Timeline
created
status_change
queued → completed