Skip to content

fix: sonnet heartbeat pulses + hard execution rule in every HEARTBEAT.md - #38

Merged
0xthc merged 2 commits into
mainfrom
heartbeat-execution-hardening
Jun 12, 2026
Merged

fix: sonnet heartbeat pulses + hard execution rule in every HEARTBEAT.md#38
0xthc merged 2 commits into
mainfrom
heartbeat-execution-hardening

Conversation

@0xthc

@0xthc 0xthc commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Why

Closing the loop on the 2026-06-12 tenant-30ccc556 incident: created tasks sat in todo forever — never in_progress, never failed. Root-cause chain, verified live on the pod:

  1. Agents woke but the pulse ran on agents.defaults.heartbeat.model: haiku, which lazily acked HEARTBEAT_OK without touching the board.
  2. When an agent DID produce a substantive turn, it sometimes narrated ("Claim, execute, complete") then emitted NO_REPLY — turn over, ticket stranded.
  3. Worse: any substantive heartbeat final on a board-only agent (no chat channel) is persisted by OpenClaw as pendingFinalDelivery, and every later heartbeat replays the stale text instead of running the model — the wedge never clears (eng:main was at 292 replay attempts). The runtime half of that fix is squad-store's new board-only sendPolicy: deny (infrastructure branch, commit 6f0e9d16).

What

  • heartbeat.model: "sonnet" on every bundle agent + template.
  • Execution rule (hard) paragraph in every HEARTBEAT.md + template: act through tool calls, never narration; NO_REPLY only ever as the entire final message when there is genuinely nothing to do.
  • All bundle versions patch-bumped.

Verification

  • node scripts/test-validator.mjs — 52/52
  • node scripts/validate.mjs — 8 bundles valid
  • node scripts/eval.mjs — 34 traces pass
  • Live pod proof after the equivalent in-pod patch + wedge clear: boot sweep → real turns (58s/125s/325s) → 51a3dc1f done, cf92e4a8 done, d340f0c7 failed with an actionable failure_reason (Meta MCP unreachable).

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 12, 2026 22:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens heartbeat/autonomy-pulse behavior across squad agents (to prevent “narrate then NO_REPLY” and “heartbeat OK but no board progress” failure modes) by pinning heartbeat execution to sonnet and adding a strict “tool-calls only” execution rule to HEARTBEAT procedures. It also introduces a new product-squad bundle and expands eng-squad with a write-lane build-agent, alongside patch version bumps across multiple bundles and README/catalog updates.

Changes:

  • Pin heartbeat.model: "sonnet" across agents/templates and add a hard execution rule to HEARTBEAT.md files.
  • Add the new product-squad bundle (agents, workflows, crons, onboarding docs, replay eval traces).
  • Expand eng-squad with build-agent + eng.implement_idea workflow; bump bundle versions and update catalog/docs.

Reviewed changes

Copilot reviewed 57 out of 57 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
template/agents/example-agent/HEARTBEAT.md Add hard “tool calls only / NO_REPLY discipline” rule to the template heartbeat.
template/agents/example-agent/agent.json Pin heartbeat model to sonnet in the template agent config.
squads/product-squad/SQUAD.md New squad overview describing PM + feedback lanes and board-only reporting.
squads/product-squad/ONBOARD.md New onboarding script for Notion connection, vault token, DB IDs, and first dispatch.
squads/product-squad/manifest.json New bundle manifest with 3 workflows, tool perms, and required secret.
squads/product-squad/crons/jobs.json Add cron schedules for daily idea triage + feedback harvest.
squads/product-squad/evals/README.md Document replay-eval tier usage/authoring for product-squad.
squads/product-squad/evals/replay/product.triage_ideas/happy-path.trace.json New replay trace for triage workflow.
squads/product-squad/evals/replay/product.write_prd/happy-path.trace.json New replay trace for ad-hoc PRD workflow.
squads/product-squad/evals/replay/product.harvest_feedback/happy-path.trace.json New replay trace for feedback harvest workflow.
squads/product-squad/agents/pm-agent/SOUL.md Define PM-agent scope, research standard, boundaries, escalation rules.
squads/product-squad/agents/pm-agent/skills/product-write-prd.md Define procedure for ad-hoc PRD workflow.
squads/product-squad/agents/pm-agent/skills/product-triage-ideas.md Define procedure for daily ideas DB sweep + verdicts.
squads/product-squad/agents/pm-agent/MEMORY.md Add onboarding-filled pointers for DB id, status flow, vault key.
squads/product-squad/agents/pm-agent/IDENTITY.md Add identity doc for PM-agent.
squads/product-squad/agents/pm-agent/HEARTBEAT.md New heartbeat procedure including hard execution rule.
squads/product-squad/agents/pm-agent/agent.json New agent config (heartbeat pinned to sonnet).
squads/product-squad/agents/feedback-agent/SOUL.md Define feedback-agent scope, dedupe/triage principles, boundaries.
squads/product-squad/agents/feedback-agent/skills/product-harvest-feedback.md Define harvest workflow procedure.
squads/product-squad/agents/feedback-agent/MEMORY.md Add onboarding-filled pointers for feedback DB, sources, checkpoint.
squads/product-squad/agents/feedback-agent/IDENTITY.md Add identity doc for feedback-agent.
squads/product-squad/agents/feedback-agent/HEARTBEAT.md New heartbeat procedure including hard execution rule.
squads/product-squad/agents/feedback-agent/agent.json New agent config (heartbeat pinned to sonnet).
squads/paid-ads-squad/manifest.json Patch bump bundle version.
squads/paid-ads-squad/agents/meta-ads-agent/HEARTBEAT.md Add hard execution rule paragraph.
squads/paid-ads-squad/agents/meta-ads-agent/agent.json Pin heartbeat model to sonnet.
squads/paid-ads-squad/agents/google-ads-agent/HEARTBEAT.md Add hard execution rule paragraph.
squads/paid-ads-squad/agents/google-ads-agent/agent.json Pin heartbeat model to sonnet.
squads/outreach-squad/manifest.json Patch bump bundle version.
squads/outreach-squad/agents/outreach-agent/HEARTBEAT.md Add hard execution rule paragraph.
squads/outreach-squad/agents/outreach-agent/agent.json Pin heartbeat model to sonnet.
squads/eng-squad/SQUAD.md Update squad positioning to two-lane (triage + build) description.
squads/eng-squad/ONBOARD.md Extend onboarding for Build lane merge policy + update instructions.
squads/eng-squad/manifest.json Add build-agent and new eng.implement_idea workflow; bump version.
squads/eng-squad/evals/replay/eng.weekly_report/happy-path.trace.json Update replay trace metadata (installed squad version).
squads/eng-squad/evals/replay/eng.triage_issue/happy-path.trace.json Update replay trace metadata (installed squad version).
squads/eng-squad/evals/replay/eng.triage_issue/regression-hallucinated-id.trace.json Update replay trace metadata (installed squad version).
squads/eng-squad/evals/replay/eng.sweep_open_issues/happy-path.trace.json Update replay trace metadata (installed squad version).
squads/eng-squad/evals/replay/eng.implement_idea/happy-path.trace.json Add new replay trace for build-agent workflow.
squads/eng-squad/agents/triage-agent/HEARTBEAT.md Add hard execution rule paragraph.
squads/eng-squad/agents/triage-agent/agent.json Pin heartbeat model to sonnet.
squads/eng-squad/agents/build-agent/SOUL.md New Build lane “soul” defining scope, merge policy, boundaries.
squads/eng-squad/agents/build-agent/skills/implement-idea.md New end-to-end implementation workflow procedure.
squads/eng-squad/agents/build-agent/MEMORY.md New Build agent memory/index for onboarding + merge policy.
squads/eng-squad/agents/build-agent/IDENTITY.md New identity doc for Build agent.
squads/eng-squad/agents/build-agent/HEARTBEAT.md New heartbeat procedure including hard execution rule.
squads/eng-squad/agents/build-agent/agent.json New build-agent config with model + heartbeat model pinned to sonnet.
squads/community-squad/manifest.json Patch bump bundle version.
squads/community-squad/agents/reddit-agent/HEARTBEAT.md Add hard execution rule paragraph.
squads/community-squad/agents/reddit-agent/agent.json Pin heartbeat model to sonnet.
squads/analytics-squad/manifest.json Patch bump bundle version.
squads/analytics-squad/agents/analytics-agent/HEARTBEAT.md Add hard execution rule paragraph.
squads/analytics-squad/agents/analytics-agent/agent.json Pin heartbeat model to sonnet.
squads/ai-seo-squad/manifest.json Patch bump bundle version.
squads/ai-seo-squad/agents/geo-agent/HEARTBEAT.md Add hard execution rule paragraph.
squads/ai-seo-squad/agents/geo-agent/agent.json Pin heartbeat model to sonnet.
README.md Add product-squad to catalog; update eng-squad description + agent list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +5
{
"id": "pm-agent",
"description": "Product manager agent — owns the idea-to-PRD pipeline: triages Status=New entries in the Notion ideas DB, researches each idea, writes complete PRD sub-pages, and sets the build/reject verdict.",
"heartbeat": {
"every": "24h",
Comment on lines +1 to +5
{
"id": "feedback-agent",
"description": "Feedback harvester agent — collects user feedback daily from the configured sources, deduplicates it, files it into the Notion feedback DB with priority labels, and flags recurring themes.",
"heartbeat": {
"every": "24h",
Comment thread squads/eng-squad/evals/replay/eng.weekly_report/happy-path.trace.json Outdated
Comment thread squads/eng-squad/evals/replay/eng.triage_issue/happy-path.trace.json Outdated
Comment thread squads/eng-squad/evals/replay/eng.sweep_open_issues/happy-path.trace.json Outdated
Comment thread squads/eng-squad/evals/replay/eng.implement_idea/happy-path.trace.json Outdated
Comment thread squads/product-squad/evals/replay/product.triage_ideas/happy-path.trace.json Outdated
Comment thread squads/product-squad/evals/replay/product.write_prd/happy-path.trace.json Outdated
Comment thread squads/product-squad/evals/replay/product.harvest_feedback/happy-path.trace.json Outdated
Two live failure modes from the 2026-06-12 tenant debugging, committed as
bundle contract:

- heartbeat.model: sonnet on every agent (and the template). The pulse
  inherited agents.defaults.heartbeat.model=haiku, which lazily acked
  HEARTBEAT_OK instead of working the board — assigned tickets sat in todo
  through every wake.
- Execution rule (hard) in every HEARTBEAT.md: act through tool calls,
  never narration; NO_REPLY only as the entire final message when steps
  1-3 found nothing. A narrated 'Claim, execute, complete' followed by
  NO_REPLY terminated a turn with a live ticket stranded. The rule also
  keeps finals empty-by-default, which matters because a substantive
  heartbeat final used to wedge board-only agents in OpenClaw's
  pending-final-delivery replay loop (fixed pod-side in squad-store by
  sendPolicy deny; this is the belt to that suspenders).

All bundle versions patch-bumped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@0xthc
0xthc force-pushed the heartbeat-execution-hardening branch from d365eb9 to e8a04d0 Compare June 12, 2026 23:42
…manifests

Copilot on #38: pm-agent/feedback-agent lacked the top-level model pin
every other agent carries, and the version bumps left every replay
trace's setup.installed_squads on the previous bundle version (Copilot
flagged eng+product; the same staleness applied to all seven bundles —
synced all 34 traces).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@0xthc
0xthc merged commit 99771b9 into main Jun 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants