You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lookout: at 1,000 subscribers, a lead's notes on finished tasks lag by about 20 s #576
Found by the Sonny perf screen added in #573 (bench/sonny_screen.py, lookout scenario). The numbers are recorded in docs/DAEMON_MEASUREMENTS.md under that PR's matched screen.
What the screen shows
Subscribers
Task turns ended
Named in a lead's note within 10 s of the load
Note p95
100
(all)
every one
2.8 s
1,000
5,000
660
12 to 20 s across runs
The lookout's CPU per 1k deltas stays flat at about 10 ms, so it isn't CPU-bound. The daemon's timings in the same run didn't move either.
Likely cause
A lead takes its notes one turn at a time. When a hundred of its tasks finish together, their news queues behind the lead's current turn, then behind each note turn after it. So the delay grows with how many tasks finish at once, not with the lookout's own work.
What to decide
This is the lookout's batching question, not a daemon one. Options, in the order I'd look at them:
Coalesce into the running turn. A lead that is mid-turn gets the waiting news as one attached note (delivery: "attach", as steers do), instead of a new turn per batch. This follows how Codex and Claude Code fold background-task results into the next model call.
One note per batch window. When a lead's queue holds more than N endings, they go out as one note that lists them all, with a cap on its size.
Leave it. Every ending still reaches its lead, just late. The 100-subscriber case is fine.
Done when the screen's p95 at 1,000 subscribers is close to the 100-subscriber one, and every ended turn is named.
Activity