| name | nighttime-mode |
| effort | high |
| description | Autonomous overnight orchestration mode. Active outside day hours. Dispatch and monitor deep work across agents while user sleeps. Internal building only — no external actions. |
| triggers | ["nighttime mode","overnight mode","night mode","overnight orchestration","nighttime protocol"] |
Nighttime Mode
Orchestrate deep work across agents while the user sleeps.
Dispatch tasks, monitor progress, prepare morning briefing.
Hard Guardrails — NEVER Cross
- No external communications — No emails, messages, posts, or DMs sent to anyone outside the system
- No purchases or transactions — No buying, no transfers, no commitments
- No permanent deletes — All actions must be reversible
- No production deploys — Prepare PRs, don't merge; build assets, don't publish
- No commitments on user's behalf — No promises, deadlines, or agreements
- No approval creation at night — Queue approval requests for morning; do not create them at night
When in doubt: Document it, present in morning review.
What TO Do Overnight
| Category | Examples | Assign to |
|---|
| Research | Market analysis, competitor research, trend analysis | research agents |
| Building | Code on feature branches, scripts, tools | dev agents |
| Content drafts | Scripts, outlines, social copy (drafts only) | content agents |
| Analysis | Data processing, metrics review, document processing | analyst agents |
| Organization | File organization, task grooming, template creation | any appropriate agent |
| Self-improvement | Skill development, workflow optimization | orchestrator |
Quick Start Loop
1. CHECK: cortextos bus list-tasks --status in_progress
→ Any overnight tasks dispatched?
2. IF tasks are running:
a. Check agent heartbeats: cortextos bus read-all-heartbeats
b. Check inbox for completion reports: cortextos bus check-inbox
c. Process completions, dispatch next tasks if queue has more
d. GOTO step 1
3. IF no tasks pending:
a. Begin preparing morning briefing data
b. Update heartbeat: cortextos bus update-heartbeat "preparing morning briefing"
Overnight Orchestration Protocol
Step 1: Check approved queue
cortextos bus list-tasks --status in_progress
cortextos bus read-all-heartbeats
Step 2: Monitor agent progress
cortextos bus read-all-heartbeats
cortextos bus check-inbox
Step 3: Process completions
When an agent reports task completion:
cortextos bus complete-task "$TASK_ID" --result "<what was produced>"
cortextos bus log-event task task_completed info --meta '{"task_id":"'$TASK_ID'","agent":"<completing_agent>"}'
TODAY=$(date -u +%Y-%m-%d)
echo "COMPLETED: $TASK_ID - <description> (by <agent>)" >> "memory/$TODAY.md"
cortextos bus list-tasks --status pending
Step 4: Handle blockers
When an agent reports a blocker:
TODAY=$(date -u +%Y-%m-%d)
echo "BLOCKED: $TASK_ID - <reason> (agent: <name>)" >> "memory/$TODAY.md"
cortextos bus send-message <agent> normal '<unblocking info or reassignment>'
echo "MORNING REVIEW NEEDED: Blocker - $TASK_ID - <reason>" >> "memory/$TODAY.md"
Heartbeat During Nighttime
Update regularly to show overnight activity:
cortextos bus update-heartbeat "nighttime mode - X/Y tasks complete, monitoring agents"
Before Morning: Prepare Briefing Data
Before the morning review cron fires, ensure this data is ready in today's memory:
- What was completed (by which agent, key deliverables with file paths)
- What needs user review or decision
- Blockers discovered that need morning attention
- Recommended priorities for today
TODAY=$(date -u +%Y-%m-%d)
cat >> "memory/$TODAY.md" << MEMEOF
## Overnight Summary - $(date -u +%H:%M:%S)
### Completed
- [task] by [agent] -- [deliverable at path/]
- [task] by [agent] -- [deliverable at path/]
### Blocked (needs morning attention)
- [task] -- [reason]
### Needs User Review
- [item needing decision]
### Agent Status at Morning
[list each agent: status, last heartbeat]
MEMEOF
cortextos bus update-heartbeat "morning briefing data ready - overnight complete"
Event Logging
cortextos bus log-event action nighttime_mode_start info --meta '{"agent":"'$CTX_AGENT_NAME'"}'
cortextos bus log-event task task_completed info --meta '{"task_id":"<id>","agent":"<completing_agent>"}'
cortextos bus log-event action morning_briefing_ready info --meta '{"tasks_completed":"X","tasks_blocked":"Y"}'
Philosophy
Lower risk, higher autonomy. No external actions — internal building only.
The night is for making the user's next day easier. Dispatch, monitor, and coordinate — never act externally without them. The orchestrator's job overnight is to keep agents productive and prepare a clear morning briefing.
This is the single source of truth for nighttime mode.