Skip to main content
The nightly loop is TENET’s autonomous improvement engine. It runs while you sleep, making focused code changes, measuring results, and keeping only what improves.

How It Works

Every night at 2 AM (configurable):
  1. Mine tuples — Extract training data from today’s journal entries
  2. Synthesize context — Generate product context summary for agents
  3. Strategic reasoning — Stratus decides which agents to run based on ROI
  4. Run agents — 5 rounds per agent, ~1 hour total
  5. Retrain policy head — If 50+ new tuples since last training
  6. Pick up backlog — Grab GitHub/Linear issues for autonomous PRs

Setup

If you have OpenClaw running, add a cron job:

System Cron

Manual Run

What to Expect

First run output:

Monitoring

Check Last Night’s Results

Scorecard Output

TENET Nightly Scorecard Keep rate: 28/199 (14.1%)

Tuning

Rounds Per Agent

Default is 5. Increase for agents with high gradient:

Strategic Reasoning

PP uses recent agent performance to decide who runs. If an agent has plateaued (0 improvements in last 10 runs), it gets skipped automatically.

Cost Control

Each round costs ~0.501.00inAPItokens(dependsonmodel).5agents×5rounds= 0.50-1.00 in API tokens (depends on model). 5 agents × 5 rounds = ~15/night. Use --budget to cap costs: