Repository navigation
Sonny: triggers on Linux, kept by systemd's user manager - #344
Merged
Merged
Conversation
Triggers were launchd-only: on Linux `add` refused with triggers_unsupported. Now systemd's user manager keeps them, through `systemctl --user`, with the same CLI, tool and fires as on a Mac. Each trigger is one user service, ~/.config/systemd/user/LABEL.service, and that file is its definition as the plist is: ExecStart is the fire's arguments, and two sections systemd skips, [X-Timer] and [X-Path], hold what starts it. A load writes LABEL.timer (OnCalendar entries, Persistent=true so a time missed asleep or off fires once when back) and LABEL.path (PathChanged for --file and --commit, DirectoryNotEmpty for the asks, which reruns the service while an ask waits, as launchd's QueueDirectories does) beside it, and enables and starts both. An unload stops all three (not the fire ending its own trigger, which finishes on its own), removes the two units, their links and the timer's stamp. A service takes every process left in it when it ends, so a daemon a fire starts now runs in a scope of its own (systemd-run --user --scope), as Hermes does for its job workers, and outlives the fire. With no user manager running, add still refuses with triggers_unsupported. A --file or --commit path with a control character or a trailing space, which a unit cannot hold, is refused everywhere. Checked against a real user manager (AGENT_TEST_SYSTEMD=1): a one-off's timer fires and ends itself, a write fires a file trigger, fire by name starts the stopped daemon in its own scope, and rm removes partial states. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2ShRt6WjfWgiPdZF
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: 44542e97c1
ℹ️ 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".
… its start Each start of a trigger's service takes one ask, so ten asks or writes at once passed systemd's default start limit (five in ten seconds) and failed its path unit for good: the service now has StartLimitIntervalSec=0 (checked against systemd 255: five of ten asks were left and the path unit failed before, none after). A watched path ending in a backslash ran into the next unit line, so it is refused like one ending in a space. A definition is a plist when it starts with `<`, not when its text holds a plist key, which a message can. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2ShRt6WjfWgiPdZF
This was referenced Oct 29, 2026
Merged
lydakis
pushed a commit
that referenced
this pull request
Oct 29, 2026
Main does not build since #344 renamed Places::plist to Places::job while #318's restamp still called the old name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY
This was referenced Oct 29, 2026
lydakis
pushed a commit
that referenced
this pull request
Oct 29, 2026
Main's restamp still called Places::plist, which #344 renamed to job; sonny no longer built. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCueMjCVQsvkY7iTCR
lydakis
pushed a commit
that referenced
this pull request
Oct 29, 2026
#318's restamp still read the definition through Places::plist, which #344 renamed to Places::job, so main did not compile. The store id it rewrites now has a unit form too, and restamp runs at start on Linux. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2ShRt6WjfWgiPdZF
lydakis
pushed a commit
that referenced
this pull request
Oct 29, 2026
#344 renamed Places::plist to Places::job while #318 added a call to the old name, so main stopped compiling. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCoLcHQMmGw188SP8o
This was referenced Oct 29, 2026
lydakis
added a commit
that referenced
this pull request
Oct 29, 2026
#318's restamp still read the definition through Places::plist, which #344 renamed to Places::job, so main did not compile. The store id it rewrites now has a unit form too, and restamp runs at start on Linux. Claude-Session: https://claude.ai/code/session_013jkdGF2ShRt6WjfWgiPdZF Co-authored-by: Claude <[email protected]>
lydakis
added a commit
that referenced
this pull request
Oct 29, 2026
) * Let the lookout hear sources the person sets up outside the daemon A source is a command under [sonny.sources.NAME] in ~/.agent/config.toml that Sonny's lookout runs; each line it prints is an event (plain text or JSON with text, id, from, url, urgent). Agents subscribe by name with a subscription's new sources field and never define commands. Every event is told, unjudged, in a 'From your sources' note with the origin lookout.sources, so the approver never reads it as the person's words; an event the command marks urgent steers a busy subscriber. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCueMjCVQsvkY7iTCR * Keep source notes keyed, bounded and readable however a source prints Each event gets a sequence number in its note's key, so urgent events read in the same millisecond are never one idempotent submit. A note stops at 128 KiB of rendered lines, and from/url are cut at 300 characters. every parses its unit by suffix, so a multibyte one is refused, not a panic. stderr is read with the same bounded line reader as stdout. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCueMjCVQsvkY7iTCR * Format the source note size test Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCueMjCVQsvkY7iTCR * Drop waiting source events no subscription hears any more Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCueMjCVQsvkY7iTCR * Give the MCP lookout test's service a source runner Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCueMjCVQsvkY7iTCR * Name a trigger's job file by its scheduler when restamping Main's restamp still called Places::plist, which #344 renamed to job; sonny no longer built. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCueMjCVQsvkY7iTCR --------- Co-authored-by: Claude <[email protected]>
Merged
lydakis
added a commit
that referenced
this pull request
Oct 30, 2026
…oal clear clears (#397) * Goals: keep an agent working until a check command passes The goal tool sets an agent, or a task it made, a goal: what done looks like and a shell command that exits 0 once it is. The lookout runs the check each time the agent's turn completes; while it fails, the agent gets a turn with its exit code and the end of its output, and its lead hears nothing. The goal ends once the check passes, the budget is spent, two turns it started call no tool, or the agent gives up with blocked, and the lead hears that last turn with how it ended. No judge, nothing in the daemon. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: the lead-reaction test's lookout gets its goals * Goals: answer Codex's review - A check's output is read as it prints, keeping only its end. - A turn's goal is read fresh as the turn ends, so one a lead set or cleared meanwhile counts. - One check at a time per agent; a turn that ends while one runs is plain news. - A task is the caller's by its creator's id, not its name. - A turn waiting for its check keeps the replay cursor before it, so a restarted lookout runs the check again. - The check runs without the provider keys in ~/.agent/env. - The macOS skip is back on the trigger test, not on note_for. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Triggers: restamp reads the job file by its new name Main does not build since #344 renamed Places::plist to Places::job while #318's restamp still called the old name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: answer Codex's second review - A goal left by an agent deleted while the lookout was away is dropped when another agent with that name ends a turn. - A goal's next turn is not news while it runs, as its end is. - A goal cleared or set again while its check ran is plain news, even when that check passed. - Listing goals shows a lead its tasks' goals, whoever set them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a turn its check holds is not judged, and a goal given up while its check ran ends so Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a goal set again counts its turns without a tool from 0 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a dropped connection stops the checks under way, which the replay runs again Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a stopped check takes what it started with it, and a replayed turn is not counted twice Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: the lead hears how a goal ended in the lookout's words only The reason an agent gives up for, and a check it set itself, are its own text; the lead reads them in the turn or with the goal tool. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a lookout giving way stops its checks, and only a heard task's turn waits on one Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a check runs where its turn worked, and how a goal ended survives a later turn's news Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a check goes without every provider key an agent's shell does Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: tests for a goal its lead sets, a turn that ends mid-check, and a lookout that gives way mid-check Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a turn the lead's wait read still says how its goal ended Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: the held-turn test asks due() as main's lookout has it Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a check under way keeps the replay cursor before its turn, watched or not Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a wait that reads a turn leaves how its goal ended to tell Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a trigger passing a turn's answer on leaves how its goal ended to tell Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: deleting an agent stops its check Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a goal set again while its last one is checked is checked afresh Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: how a goal ended is news even while the lead waits on its turn Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Daemon companions: commands the daemon keeps running for as long as it runs `agent companion add/rm/ls` keeps a command in the store that every daemon on it starts once it listens, restarts with backoff and stops at shutdown. Sonny's lookout and approver now run as companions, so they share the daemon's life cycle whether or not a window is open. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Companions: log setup off the runtime thread, the whole group stopped, a removed one waited for, and Sonny's take store and socket from the daemon Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Companions: idle-exit counts from the last client's activity, a companion's whole group is no client, and a log that is no file fails at once Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Companions: a session is a companion's or not once, as it opens Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Sonny: /goal sets the agent a goal by hand, checked at once when it is idle `/goal CHECK` keeps the agent the window shows working until CHECK exits 0 in its folder; `/goal` shows its goal and `/goal clear` clears it. With no turn running, the goal file carries the agent's last turn as `check_after` and the lookout runs the check on its next tick, as if that turn had just completed, so a failing check starts the agent's goal turn at once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: /goal starts an agent with no turn yet, and a check-at-once mark stays until its check says Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: a check settles only what is its own goal's, by when it was set Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY * Goals: /goal WHAT goes to the agent as typed, which sets its own goal George picked the Codex shape: the person's words reach the agent as their message, and the agent sets the goal and its check with its goal tool, whose description now says so. /goal shows the goals of the agent and its tasks, and /goal clear clears its own, through the tool's own call. The person-set check and check-at-once machinery is gone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHCyGRHdT5WYDPKVFY --------- Co-authored-by: Claude <[email protected]>
lydakis
pushed a commit
that referenced
this pull request
Oct 30, 2026
Memory beats codified behavior: lead.md and task.md now say that what the person's memory says about how they want work done overrides their defaults, and their latest words override both. The scattered "save X to memory" sentences in lead.md fold into one paragraph, which also asks to save what the person welcomed, not only what they corrected. The memory skill and tool say the same: memory that holds only corrections steers agents away from what already works; save the approach, never that the person liked being agreed with. Pinned picks are left to the model and to memory: "Needs you:" as a literal reply label, "at most three" open decisions, the react tool's emoji meanings and "React rarely", and "draw it in Mermaid". Drops the stale "Triggers need Sonny on a Mac" (Linux since #344). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGGVwTdQTtcHeKUqRa6
lydakis
added a commit
that referenced
this pull request
Oct 30, 2026
…ed (#410) Memory beats codified behavior: lead.md and task.md now say that what the person's memory says about how they want work done overrides their defaults, and their latest words override both. The scattered "save X to memory" sentences in lead.md fold into one paragraph, which also asks to save what the person welcomed, not only what they corrected. The memory skill and tool say the same: memory that holds only corrections steers agents away from what already works; save the approach, never that the person liked being agreed with. Pinned picks are left to the model and to memory: "Needs you:" as a literal reply label, "at most three" open decisions, the react tool's emoji meanings and "React rarely", and "draw it in Mermaid". Drops the stale "Triggers need Sonny on a Mac" (Linux since #344). Claude-Session: https://claude.ai/code/session_013jkdGGVwTdQTtcHeKUqRa6 Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Triggers only worked with launchd. On Linux,
addrefused withtriggers_unsupported. Now systemd's user manager keeps them throughsystemctl --user. The CLI, thetriggerstool and the fire are the same as on a Mac. No daemon change: as on a Mac, nothing of a trigger runs between its fires.How it maps
~/Library/LaunchAgents/LABEL.plistis the definition~/.config/systemd/user/LABEL.serviceis the definition (ExecStart== the fire's arguments)StartCalendarInterval(catches up once after sleep)LABEL.timer:OnCalendar=per entry,Persistent=true,AccuracySec=1sWatchPaths(--file,--commit)LABEL.path:PathChanged=QueueDirectories(asks,fire NAME)LABEL.path:DirectoryNotEmpty=forNAME.asksandNAME.taking. It re-runs the service while an ask waits.Type=oneshotservice, no second start while activelaunchctl bootstrap/bootout[X-Timer]/[X-Path]sections (systemd skipsX-sections),daemon-reload,enable --now. Unload: stop timer, path and service, remove the units, their.wantslinks and the timer's stamp, thendaemon-reloadThe service file carries the whole definition, the same way the plist does. Everything built on it (idempotent
add,--replace, retire with tombs,finish,refreshwhen Sonny moves, and the case check) is shared code. A fire that ends its own trigger is not stopped; it finishes by itself, because nothing starts it again. On a Mac, bootout kills it instead. An ask that is already gone counts as done.The daemon a fire starts. A systemd service kills every process left in it when it ends.
setsiddoes not get a process out of its cgroup. So on Linux, a fire under systemd (INVOCATION_IDset) starts the daemon withsystemd-run --user --scope, which puts it in a scope of its own. That is how Hermes keeps its job workers alive. Without the scope the daemon dies with the fire. I checked this in a container with a user manager: asetsidchild is killed when a oneshot ends, and the same child undersystemd-run --scopesurvives. This also covers the planned "daemon companions": they start from the daemon, so they live in its scope.Other harnesses on Linux. OpenClaw (
openclaw gateway install) and Hermes (hermes gateway install) both run a resident gateway as a systemd user service and schedule inside it. Hermes runs each job in a transient user scope. Agent keeps its "no scheduler in the daemon" rule and uses the OS scheduler for each trigger, as on macOS.Limits, same as macOS. The user manager runs only while the user is logged in, like LaunchAgents. Triggers that should fire while logged out need
loginctl enable-linger(documented; Sonny does not turn it on). With no user manager running (nosystemd/privateinXDG_RUNTIME_DIR, or in/run/user/UIDwhen that variable is unset),addrefuses withtriggers_unsupportedas before. There is no cron fallback: cron cannot watch paths or the ask queue. A--file/--commitpath with a control character or a trailing space is now refused on every system, because a unit file cannot hold one.Environment. On Linux the fire also gets
XDG_CONFIG_HOMEandXDG_DATA_HOMEasaddhad them, so it finds its unit and the timer stamp whereaddput them.Tests
cargo test -p sonny: new tests for the unit format (round trip of a message with%,$, quotes, backslashes, tabs and newlines;OnCalendartimes; watched path; moved app; timer/path files as written), for quoting, for refused paths, and for the systemd lifecycle (add, duplicate, case clash,fire, refresh, finish of a cut-short retire,rm). The launchd tests are unchanged.tests/test_trigger.py: on Linux the fire tests now write the systemd definition. Linux now unloads the way a Mac does, so the old "no launchd here" branches are gone. A newAGENT_TEST_SYSTEMD=1live test, which mirrors the launchd one, writes real units: a one-off's timer fires and the trigger ends itself, a write fires a file trigger,fireby name restarts the stopped daemon in its own scope (the test checks its cgroup), andrmremoves units the manager no longer has or that were left without their service, timer stamp included. It passed against a real systemd 255 user manager.tests/test_trigger.pyandtests/test_served.pypassed both with a reachable user manager and with none, the second being the likely CI case. The "refused" tests pointXDG_RUNTIME_DIRat an empty folder so the result does not depend on the runner.cargo clippy --workspace --all-targets -D warningsandcargo fmt --checkare clean.