Repository navigation
Sonny leads: a self-set next look instead of a fixed heartbeat - #433
Conversation
A lead hears only when something happens, so what goes stale quietly (a review waiting, a deadline near, an unanswered question) needs a look the lead sets itself. lead.md: keep one repeating trigger, LEAD.next, at the earliest time something held would go stale, judged from its stakes, pace, due date and the person's urgency, with everything heard feeding that judgement; gated to skip while the person is writing; later after a look that found nothing; outside the person's hours (from memory, else learned from when they write) leave what can wait; removed once nothing is open. superlead.md: its next look holds only what spans projects. A repeating trigger rather than a one-shot, since a one-shot's failed turn leaves no trace (#422). No code change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9eb454c179
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
# Conflicts: # sonny/FEATURES.md # sonny/agents/superlead.md
…r turn `memory said SINCE` listed every message in a turn that ran since then, so the prompt that started a long turn hours ago still counted as recent, and a next look gated on it never fired while that turn ran. History keeps no times, so the message that opens a turn is dated by the turn's start and dropped when that is before SINCE; what the person sent into it later still counts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3613c8a731
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6
Scenario eval resultsOne pass of 4 runs on chatgpt/gpt-6.1-sol, built from 52fff75. That commit has the same role text as the merge but not the
What worked:
What didn't:
The prose names neither field nor the command concretely enough. A follow-up will name Cost: 1.88 M input tokens (1.68 M cached) and 24.6 k output over 16 turns. Most of it went to the release and overnight leads also starting monitors. Generated by Claude Code |
…ample The eval of #433 showed leads setting the look as a one-off `at` (3 of 4), with no if command (4 of 4), and one under the wrong name. A one-off whose if command says no ends, so a skipped look was gone. lead.md now says the look repeats (every, or cron for a set hour), never at or in, gives the skip-while-writing check as a command, names it by example (web.lead.next for web.lead), and says the next setting uses replace. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6
…ample (#449) * Sonny triggers: a sent one-shot keeps its row until its turn ends well A one-off, or a `--runs` trigger's last run, deleted its state row as soon as its message went out, so a turn that failed afterwards (offline, a login expired) left nothing for /background, the footer's count or the triggers tool to show. Its row now stays, and whoever asks the daemon how its turn ended removes it once that turn completed with any answer passed on; a failed one stays until removed, as systemd keeps a failed unit until reset-failed. Fixes #422. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers: forget a done one-shot also once it ends after its turn Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Runtime tests: a sent one-shot keeps its row until its turn ends well Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers: forgetting a done one-shot never waits for the lock Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny: the lead's next look repeats, with a ready check and a name example The eval of #433 showed leads setting the look as a one-off `at` (3 of 4), with no if command (4 of 4), and one under the wrong name. A one-off whose if command says no ends, so a skipped look was gone. lead.md now says the look repeats (every, or cron for a set hour), never at or in, gives the skip-while-writing check as a command, names it by example (web.lead.next for web.lead), and says the next setting uses replace. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 --------- Co-authored-by: Claude <[email protected]>
…454) * Sonny triggers: a sent one-shot keeps its row until its turn ends well A one-off, or a `--runs` trigger's last run, deleted its state row as soon as its message went out, so a turn that failed afterwards (offline, a login expired) left nothing for /background, the footer's count or the triggers tool to show. Its row now stays, and whoever asks the daemon how its turn ended removes it once that turn completed with any answer passed on; a failed one stays until removed, as systemd keeps a failed unit until reset-failed. Fixes #422. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers: forget a done one-shot also once it ends after its turn Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Runtime tests: a sent one-shot keeps its row until its turn ends well Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers: forgetting a done one-shot never waits for the lock Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny: the lead's next look repeats, with a ready check and a name example The eval of #433 showed leads setting the look as a one-off `at` (3 of 4), with no if command (4 of 4), and one under the wrong name. A one-off whose if command says no ends, so a skipped look was gone. lead.md now says the look repeats (every, or cron for a set hour), never at or in, gives the skip-while-writing check as a command, names it by example (web.lead.next for web.lead), and says the next setting uses replace. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers test: a lock just dropped may still be held a moment a_fire_ends_only_the_trigger_it_ran_for failed once on macOS (#380's run): forget_done returned 0 right after the test dropped the lock it held. flock belongs to the open file, and a process another test forks shares it until it execs, so the lock can stay taken a moment after the drop. forget_done is built for that (Sonny's window tries again on its next refresh), so the test now tries again for up to five seconds, as the window would. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 --------- Co-authored-by: Claude <[email protected]>
🤖 Generated with Claude Code
Why
George picked "Rule, self-set next look" for adaptive check-ins. The design page is at https://claude.ai/artifact/MwvJjZSo5CXVV79PZPsv1T.
A lead hears only when something happens. So anything that goes stale quietly, such as a review waiting, a deadline coming up, or a question nobody answered, needs a look that the lead schedules itself. There is no fixed heartbeat by default.
What
Role text
lead.mdgets one paragraph after the triggers paragraph:LEAD.next, set to the earliest time anything it holds would go stale. It judges that from stakes, from how much is moving around each thing, from how soon things are due, and from how urgent the person is.ifgate skips the look while the person is writing. The gate checks that~/.agent/memory saidlists nothing from them since twenty minutes ago.superlead.md: the superlead's next look holds only what spans projects.FEATURES.md: this entry is added to the Proactive leads row.The trigger repeats instead of being a one-shot
--at, because a one-shot whose turn fails leaves no trace (#422).memory saiddates a message by when it was written (Codex review)saidlisted every message in any turn that ran since SINCE. A task's opening prompt from hours ago therefore counted as the person writing for as long as the task ran, and the gate never fired.started_ms. It is dropped when that time is before SINCE. Messages sent into the turn later still count.Open risk
The gate's
memory saidwalks every bot's turns once per look, with oneturnsrequest per bot. That's fine at a look every few hours. At thousands of bots it should be measured.Tests
cargo test -p sonnypasses (536), and clippy is clean. The results of a scenario eval will be posted here. Its scenarios: a release coming up, a review waiting overnight, nothing open, and the person mid-conversation.