Files
clawdbot/src/infra
JustYannicc dd06028827 feat(heartbeat): skip API calls when HEARTBEAT.md is effectively empty (#1535)
* feat: skip heartbeat API calls when HEARTBEAT.md is effectively empty

- Added isHeartbeatContentEffectivelyEmpty() to detect files with only headers/comments
- Modified runHeartbeatOnce() to check HEARTBEAT.md content before polling the LLM
- Returns early with 'empty-heartbeat-file' reason when no actionable tasks exist
- Preserves existing behavior when file is missing (lets LLM decide)
- Added comprehensive test coverage for empty file detection
- Saves API calls/costs when heartbeat file has no meaningful content

* chore: update HEARTBEAT.md template to be effectively empty by default

Changed instruction text to comment format so new workspaces benefit from
heartbeat optimization immediately. Users still get clear guidance on usage.

* fix: only treat markdown headers (# followed by space) as comments, not #TODO etc

* refactor: simplify regex per code review suggestion

* docs: clarify heartbeat empty file behavior (#1535) (thanks @JustYannicc)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-24 04:19:01 +00:00
..
2026-01-17 08:00:05 +00:00
2026-01-07 23:22:12 +00:00
2026-01-20 16:02:46 +00:00
2026-01-08 02:44:19 +00:00
2026-01-14 15:02:19 +00:00
2026-01-05 01:11:29 +01:00
2026-01-09 09:59:58 +01:00
2026-01-21 01:58:47 +00:00
2026-01-17 12:30:11 +00:00
2026-01-14 15:02:19 +00:00
2026-01-10 16:37:54 +01:00
2026-01-18 05:44:22 +00:00
2026-01-18 08:45:29 +00:00
2026-01-14 15:02:19 +00:00
2026-01-14 15:02:19 +00:00
2026-01-16 07:33:15 +00:00
2026-01-19 05:59:29 +00:00
2025-12-23 03:00:04 +01:00
2026-01-17 18:32:23 +00:00