monitor-loop

Tail NDJSON event logs to coordinate background sub-agents without blocking on TaskOutput.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/rghamilton3/mission-control-rack --skill monitor-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monitor-loop
Source: https://github.com/rghamilton3/mission-control-rack/tree/main/.claude/skills/monitor-loop
Command: npx skills add https://github.com/rghamilton3/mission-control-rack --skill monitor-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents the orchestrator from blocking on full TaskOutput dumps and from being overwhelmed by verbose sub-agent transcripts by converting milestone signals into concise NDJSON events consumed by a Monitor.

Core Features & Use Cases

  • Background execution: Spawn specialist sub-agents with run_in_background so the orchestrator proceeds without waiting on full transcripts.
  • Event-driven coordination: Sub-agents append single-line NDJSON events to .cortex/events.log to signal task_done, contract_ready, milestone_reached, or error.
  • Efficient monitoring: Use a Monitor that tails the event log with line-buffered grep to emit discrete notifications into the orchestrator's flow.
  • Safety and recovery: Includes a timeout-based safety net to pull an individual agent's TaskOutput when events are missing and guidance on limiting Monitor volume.
  • Use case: Orchestrate parallel waves of specialists (e.g., builders, testers, documenters) and advance waves only when authoritative task_done and contract_ready events arrive.

Quick Start

Initialise the .cortex/events.log, spawn specialist tasks with run_in_background enabled, and start a Monitor to tail the log for task_done and contract_ready events.

Frequently Asked Questions about monitor-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run parallel sub-agents without blocking the orchestrator on TaskOutput?

Parallel sub-agent orchestration avoids blocking by spawning background agents and using a monitor to tail an NDJSON event log for milestone signals instead of pulling full TaskOutput transcripts.

What's the best way to coordinate background tasks using an event log in multi-agent workflows?

Background task coordination uses a monitor that line-buffered tails an NDJSON event log, capturing discrete events like task_done or contract_ready to advance orchestration waves without transcript overload.

How does NDJSON event monitoring work for sub-agent milestone signaling?

NDJSON event monitoring works by having sub-agents append single-line structured events to a shared log, which a monitor tails with line-buffered grep to emit notifications into the orchestrator's flow.

How do I handle timeouts and error recovery when monitoring background agents?

Timeout-based recovery handles missing events by triggering targeted TaskOutput retrieval for individual agents, pulling their full transcripts only when an error or timeout is detected.

Can I orchestrate parallel waves of specialist agents and advance them conditionally?

Parallel waves of specialist agents advance conditionally when the monitor detects authoritative task_done and contract_ready events from the NDJSON log, ensuring wave progression only on valid completion signals.

When should I avoid pulling full sub-agent transcripts during orchestration?

You should avoid pulling full transcripts during orchestration when verbose sub-agent output would overwhelm the orchestrator, opting instead for concise NDJSON milestone events until an error requires targeted retrieval.