Skip to main content

/watcher-status - Context Watcher Status & Health

Verify codi-watcher health and display time-filtered export activity reports with comprehensive diagnostics.

System Prompt

EXECUTION DIRECTIVE: When the user invokes this command, you MUST:

  1. Check watcher state - Read watcher-state.json for v2 state
  2. Verify daemon running - Check launchctl/systemd status
  3. Count exports - Tally from archives and pending directories
  4. Apply time filter - Filter by --hours or --days if specified
  5. Display report - Show formatted health status

REQUIRES CONFIRMATION: No - read-only operation.


Usage

/watcher-status                    # Full status report
/watcher-status --hours 12 # Exports in last 12 hours
/watcher-status --days 7 # Exports in last 7 days
/watcher-status --json # JSON output for scripting
/watcher-status --verbose # Include all session cooldowns

Options

OptionDescription
--hours NFilter exports to last N hours
--days NFilter exports to last N days
--jsonOutput as JSON for scripting
--verboseInclude detailed session cooldowns
--llm <name>Filter to specific LLM (claude, codex, gemini, kimi)

Examples

# Check overall watcher health
/watcher-status

# Recent activity (last 12 hours)
/watcher-status --hours 12

# Weekly summary
/watcher-status --days 7

# Claude-only exports
/watcher-status --llm claude --days 1

# JSON for automation
/watcher-status --json | jq '.total_exports'

Output Format

======================================================
CODITECT Context Watcher Status
======================================================

Daemon Status: RUNNING (via launchctl, PID: 12345)
Version: 2.0.0
Started: 2026-02-01T07:39:49Z (2 days ago)

--- Export Summary ---
Total Exports (all time): 546
- Archives: 174
- Pending Anthropic: 372

Exports in Time Window: 42 (last 12 hours)
- Claude: 38
- Codex: 2
- Gemini: 1
- KIMI: 1

--- Export Frequency ---
Average: 3.5 exports/hour
Last Export: 2026-02-03T10:33:05Z (5 minutes ago)

--- Session Cooldowns ---
Active Sessions: 8
- 52579ec9: cooldown until 10:43:05Z (10 min remaining)
- ea908df3: ready for export

--- Health Assessment ---
Status: HEALTHY
[x] Daemon running
[x] Exports triggering
[x] State file updating
[x] No gaps detected (last 24h)

======================================================

What It Checks

1. Daemon Status

# macOS
launchctl list | grep ai.coditect.context-watcher

# Linux
systemctl status coditect-context-watcher

2. State File (v2 Format)

Location: ~/PROJECTS/.coditect-data/context-storage/watcher-state.json

{
"version": "2.0.0",
"global": {
"exports_triggered": 64,
"watcher_started": "2026-02-01T07:39:49Z"
},
"llms": {
"claude": {
"session_cooldowns": { ... },
"last_export": "2026-02-03T10:33:05Z",
"exports_triggered": 64
}
},
"last_saved": "2026-02-03T10:38:05Z"
}

3. Export Directories

DirectoryPurpose
~/PROJECTS/.coditect-data/context-storage/exports-archive/Old archive (174 files)
~/PROJECTS/.coditect-data/sessions-export-pending-anthropic/Claude exports
~/PROJECTS/.coditect-data/sessions-export-pending-codex/Codex exports
~/PROJECTS/.coditect-data/sessions-export-pending-gemini/Gemini exports
~/PROJECTS/.coditect-data/sessions-export-pending-kimi/KIMI exports

4. Export Gap Detection

Identifies days with no exports (potential issues).

Health Indicators

StatusCondition
HEALTHYDaemon running, exports in last 24h, state file recent
DEGRADEDMissing exports or stale state (>6h)
CRITICALDaemon not running or no exports in 48h
CommandPurpose
/cxProcess pending exports
/cxq --statsQuery context database stats
/sxInteractive multi-LLM session export

Skill

This command invokes the watcher-verification skill.

Implementation: scripts/watcher_status.py

Completion Checklist

Before marking complete:

  • Daemon status checked
  • State file parsed
  • Export counts calculated
  • Time filter applied (if specified)
  • Health assessment generated

Failure Indicators

This command has FAILED if:

  • State file not found or invalid JSON
  • Unable to determine daemon status
  • Export directories not accessible

Track

Track J: Memory Intelligence Task ID: J.19.9 (Watcher Status Command)


Version: 1.0.0 Created: 2026-02-03 Author: CODITECT Team