Status: MANDATORY — Run after EVERY task completion
Version: 1.0
Last Updated: Feb 4, 2026
After completing ANY task (direct work OR subagent return), you MUST check the queue again before asking the human for input.
Problem: Agents were checking the queue at heartbeat start (✅) but not after task completion (❌). This created a gap where autonomous execution broke down:
Heartbeat → Check Queue → Spawn Agent → Task Complete → ❌ "What's next?"
Solution: Close the loop. Every task completion is a mini-heartbeat:
Heartbeat → Check Queue → Work → Complete → Check Queue Again → Loop
Move completed task from "Ready" or "In Progress" to "Done":
## ✅ Done Today
- [x] Colony Skill integration (completed 5:00 PM)node skills/agent-autonomy-kit/check-queue.jsDo this EVERY TIME after completing a task. No exceptions.
Exit Code 1 (HIGH/CRITICAL tasks exist):
- Read the top priority task from output
- Spawn agent for that task immediately
- Log to daily memory
- DO NOT ask human "What should we tackle next?"
Exit Code 0 (Queue clear or only LOW tasks):
- Check 5D loop phases (read HEARTBEAT.md)
- Is discovery stale (>2h)? → Spawn Scout
- Are there un-triaged opportunities? → Spawn Sage
- Are there designed projects ready to build? → Spawn Link
- If all phases idle: Check for scheduled tasks in heartbeat-state.json
- If truly nothing: THEN you can say HEARTBEAT_OK or ask human
Write to memory/YYYY-MM-DD.md:
16:05 - Completed Colony Skill integration
16:05 - Ran queue checker: exit code 1 (14 HIGH tasks remain)
16:06 - Top priority: Observability Control Plane Positioning
16:06 - Spawned echo-observability-positioningScenario: Just finished Colony Skill integration
16:00 - Colony Skill task completed
16:00 - Updated tasks/QUEUE.md (moved to Done Today)
16:00 - Ran: node skills/agent-autonomy-kit/check-queue.js
16:00 - Output: "🔴 HIGH priority tasks: 14"
16:00 - Top task: "Observability Control Plane Positioning"
16:01 - Spawned: echo-observability-positioning with DEFINE spec
16:02 - Logged to memory/2026-02-04.md
Result: Autonomous execution continues. No permission needed.
Scenario: Completed last HIGH priority task
18:30 - Task completed, queue updated
18:30 - Ran queue checker: exit code 0 (no HIGH tasks)
18:30 - Checked 5D loop phases:
- Discovery: Last run 3 hours ago (stale)
- DEFINE: 2 opportunities need specs
18:31 - Decision: Spawn Scout for discovery
18:31 - Spawned: scout-discovery-run-13
Result: Moved to generative work without asking permission.
Scenario: Queue clear, 5D phases healthy
22:45 - Task completed, queue clear
22:45 - Queue checker: exit code 0
22:45 - 5D loop: All phases current
22:45 - Checked heartbeat-state.json:
- Scheduled: Observability launch Feb 6, 9 AM PST
- Scheduled: LangChain webinar Feb 5
22:46 - Decision: Active scheduling exists, no action needed now
22:46 - Logged: "Task complete, next scheduled work tomorrow 9 AM"
Result: Recognized scheduled work, didn't ask for permission.
Scenario: Completed task, immediately asked human
16:00 - Colony Skill task completed
16:00 - Updated queue
16:01 - Posted: "Task done! What should we tackle next? 🤔"
Why it's wrong:
- Didn't run queue checker
- 14 HIGH priority tasks were waiting
- Asked permission when autonomous path existed
Correct action: Run queue checker, see 14 HIGH tasks, spawn next agent.
Scenario: Subagent finished, main agent deferred
Agent spawned echo-memory-wars to write campaign
Echo completed: "88KB content ready, all deliverables complete"
Main agent: "Echo finished! When do you want to launch?"
Why it's wrong:
- Launch schedule exists in heartbeat-state.json (Feb 6, 9 AM)
- Didn't check schedule before asking
- Deferred decision that was already made
Correct action: Check schedule, see Feb 6 launch planned, confirm schedule in log, continue with other work.
You may ask the human for input if:
-
Genuinely blocked:
- Missing information you can't obtain (API keys, passwords, approvals)
- External dependency not resolved (waiting for deployment, access)
- Technical blocker you can't solve (error you can't debug)
-
Strategic decision needed:
- Product direction change
- Major budget allocation
- Policy/process changes
- Anything that affects humans downstream
-
Clarification needed:
- Task in queue is ambiguous
- Conflicting priorities (two CRITICAL tasks, unclear which first)
- Scope uncertainty (unclear if task should be HIGH or LOW)
In these cases: Document what you checked FIRST, then ask.
Example:
"Checked queue (exit code 1), top task is 'Deploy to production.'
I need approval before production deployments.
Ready to deploy when you approve."
NOT:
"What should we do next?"
Section "Heartbeat Execution" includes this protocol at step 4.
Wake routine references this before responding to humans.
The enforcer script that makes this protocol work.
Ask yourself:
- ✅ Did I update the queue?
- ✅ Did I run
check-queue.js? - ✅ Did I interpret the exit code correctly?
- ✅ Did I spawn next agent OR check 5D loop?
- ✅ Did I log my decision?
If all ✅ → Protocol followed correctly.
If any ❌ → Review protocol and retry.
Before this protocol:
- "What should we tackle next?" = common after task completion
- Permission-seeking = default behavior
After this protocol:
- "What should we tackle next?" = only when genuinely stuck
- Autonomous loop-back = default behavior
The test: Did you ask permission when the queue had the answer?
- If NO: ✅ Protocol working
- If YES: ❌ Review protocol, check queue first
A: Still run the protocol. The queue might have HIGH priority tasks added since you started the LOW task.
A: This applies to ALL task completions, regardless of session type:
- Direct human requests → complete → check queue
- Heartbeat-spawned work → complete → check queue
- Subagent returns → check queue
- Cron job completes → check queue
A: That's a blocker. Report: "Queue checker failed with error X. Need help debugging." This is a legitimate ask.
A: No. Only after completing a task. Conversational responses don't need queue checks.
Needs queue check:
- ✅ Finished building feature
- ✅ Completed research task
- ✅ Subagent reported completion
- ✅ Published content
- ✅ Deployed code
Doesn't need queue check:
- ❌ Answering factual question
- ❌ Confirming receipt of message
- ❌ Providing status update mid-task
- ❌ Reporting a blocker
v1.0 (Feb 4, 2026):
- Initial protocol
- Addresses permission-seeking after task completion
- Closes autonomy loop-back gap
- Mandatory queue re-check after every task
The loop never stops. Every task completion is a decision point. Check the queue before asking the human.