Sonny: an automation does one job; the nightly cleanup is memory's own #1461
All Vouch review confidence checks passed
Residual risk 0.40 = Change Risk (0.53) × (1 − Review Confidence (0.25)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.53 · 512 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 45% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.373
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1461"
general
weight: 0.35
chatgpt-codex-connector[bot]
<!-- claude-projects-attribution: {"github_login":"lydakis"} -->
_Requested by George · project thread_
What
An automation now does one job, as a cron line or a scheduled message does: it puts its message into an agent that is there already. Sonny only, no daemon change (
src/untouched).Cut from automations
start/--fresh(the tool'sstart,Target::Start, run numbering, adopt/unconfine,cleanup-fresh): an agent for a job is made withstart_task, then named withagent.live(--live): live templates stay for memory facts.turn_budget_tokens/budget_counts: the daemon still offers turn budgets; Sonny uses none.Changed
runs Ncounts every time the schedule came (iCalendarCOUNT), whatever each did: sent, itsifsaid no, or its agent was busy. Before, it counted messages sent. Rows and/backgroundsayran T of N.ifgoes to the agent it wakes.{"error":"invalid_automation","detail":"--turn-budget-tokens"}. It shows as a problem row in/backgroundand in its agent's or adder's tool list. There is no migration.Nightly memory cleanup becomes memory's own job (
@memory-cleanupon Sonny's scheduler,sonny memory cleanup run), with no budget.sonny memory schedule [--model M [--effort E] [--speed S]] [--cron …]writes it, andsonny memory unscheduleturns it off. It stays off until the person schedules it again.memory-cleanup-Nin~/.agents/memory, asstart_taskmakes one, then sends the cleanup ask, waits for its turn, and deletes the night before's agent.memory-cleanupautomation moves to the job once, keeping its time, model, effort, speed and daemon (upgrade stepcleanup-job, retires at 0.12.0)./backgroundshows it when its last night failed. Its page says when it runs next, on what model, and links last night's agent.xturns it off.Text: the tool description and the automation skill now give the setup as "start the job's agent with start_task, then add with
agent". docs/SONNY.md, REFERENCE.md, USAGE and FEATURES.md are updated, and the docs pictures are redrawn.Screenshots (synthetic data)
/background, before (main) and after:
<img src="https://raw.githubusercontent.com/lydakis/agent/19d7562ffa1860550925cdbbfd1f83098780b4dc/docs/sonny/background-failed.png" width="420"> <img src="https://raw.githubusercontent.com/lydakis/agent/cacd8fc9bcd239342ca95441bc0ad1e99e8cccd6/docs/sonny/background-failed.png" width="420">
Pages, before (main) and after: the automation page has no budget line, and the cleanup has its own page.
<img src="https://raw.githubusercontent.com/lydakis/agent/19d7562ffa1860550925cdbbfd1f83098780b4dc/docs/sonny/automation-page-60.png" width="600">
<img src="https://raw.githubusercontent.com/lydakis/agent/cacd8fc9bcd239342ca95441bc0ad1e99e8cccd6/docs/sonny/automation-page-60.png" width="420">
Tests
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test -p sonny -p agent-client: all pass.AGENT_TEST_RUNTIME=1 python -m unittest tests.test_trigger: 29 run, 2 skipped, all pass.- New: a trigger ends once its time came
runstimes, whatever each did.- New: a definition with a removed flag never fires.
- Removed: the start, fresh, live and turn-cap tests.
- the cleanup's schedule, its definition (no budget, a generation of its own), the move from the old automation, and a night's create/submit/wait/delete;
- runs counting ticks, and old definitions as problem rows;
- the cleanup's page.
---
_Generated by Claude Code_