Repository navigation
Sonny setup: flags and --json, the sonny-setup skill, a hand-off to another agent, and the backup offer - #428
Conversation
- With no provider anywhere, sonny in a terminal asks for one (a ChatGPT plan, an Anthropic, OpenAI or OpenRouter key, or Bedrock with an AWS profile) and keeps it in ~/.agent/env, instead of failing. The CLI now names that failure provider_required, so Sonny reads the code, not text. - With no model, Sonny lists what the providers offer and keeps the pick as AGENT_MODEL in ~/.agent/env, instead of failing with model_required. - AGENT_MODEL (and the lookout's keys) count from ~/.agent/env as well as the shell, with the file first, as the daemon and approver see it. - The first start writes ~/.agent/models when there is none, and `agent stats` starts a daemon on a fresh install like `start` does. - install.sh fetches the latest Linux release tarball, checks its sha256, and links ~/.local/bin/sonny, for machines without Homebrew. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…e file's own Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…st time and an icon after Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
First-run setup keeps settings where #251 put them, as Codex does: the provider, the default model and the suggested lead and task efforts go in ~/.agent/config.toml (top-level provider and model, [sonny] lead_effort and task_effort), and only keys and AWS_PROFILE in ~/.agent/env. agent_client::config::set writes keys line by line so the person's comments stay. The daemon takes the config's provider after AGENT_PROVIDER, and a new bot the config's model after AGENT_MODEL. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…itHub CLI is signed in The .sha256 comes from the same release as the tarball, so it only guards the download. With gh signed in, the installer also verifies the provenance the release workflow attests, as publish-homebrew does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
The portrait was drawn only over a lead just made, and a small icon after the first; a reopened lead showed none. Now the portrait is the first thing in every lead's transcript: above the history when the newest page reaches the conversation's start, and once scrolling up has loaded back to it otherwise. A side chat has none. The icon and the ~/.agent/sonny/welcomed marker go, and the two stray screenshot pages from #253 with them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…rest Setup looks before it asks: a ChatGPT sign-in of Sonny's own or Codex's (only that there is one), the keys set in the shell or ~/.agent/env, and the AWS profiles in ~/.aws/config and ~/.aws/credentials. It offers what it found first, in a list picked with the arrow keys, and Bedrock offers the profiles by name with their regions and how they sign in. A key that is set needs no question at all. The model list comes ranked, the first marked recommended so Enter takes it: models no agent runs on (embeddings, speech, images, realtime) and dated snapshots of a listed name are left out, Bedrock's global inference profiles come first, and each row shows its name and context window. A provider that will not list says how to fix it, as aws sso login for an expired session, and Enter lists again. A new config.toml starts with comments saying what each setting does, and setup ends with what it chose and any tool agents need that is missing, with the command that installs it. sonny setup asks both again, marking what is set. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…emon, unset AWS_PROFILE for no profile, replace a set key, fit the picker to narrow terminals, judge fine-tuned models by their base Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…ign-in waits for its restart instead of listing the old one's models Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…rovider the daemon runs; typed spaces stay in the picker's filter Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…picker to the terminal's height Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
sonny mcp import [--yes | --json], also offered by first-run setup and sonny setup: the servers other agents have, at home and in this folder, ticked to bring in. Secrets written into their entries go to ~/.agent/env, which stdio servers are now started with. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…efore trailing commas, give a clashing bearer token a free variable Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…s with its server Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…ves them Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…ew setup once Sonny keeps its feature register as the person last heard of it and, when this Sonny's differs, the note it already sends the first lead after an upgrade lists the new and changed rows. Setup steps an upgrade brings carry ids and done checks; each not done is offered once and noted in ~/.agent/sonny/offered, as is one setup offers itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…n before it tells Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…done Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…to another agent `sonny setup` with flags sets the provider (a key set or on stdin, an AWS profile), the model and MCP servers to bring without asking, and --json prints what the machine has and what is set. The sonny-setup skill tells any agent how. With no way to reach a model ready, first-run setup offers each of Claude Code, Codex, OpenCode or Kiro on PATH to set Sonny up with the person, in a session of its own, and goes on once a provider is set. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…ter an upgrade Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
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: b429d79910
ℹ️ 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_013jkdGH8qUQFR4a1z8DWu4L
…here the machine keeps its own Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
…ars its model, --import-mcp reads only the named agents Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36e84b7a30
ℹ️ 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".
…tays one value Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18458c6023
ℹ️ 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".
…del just chosen Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH8qUQFR4a1z8DWu4L
The third onboarding PR, after #402 (first run) and #415 (MCP import). It also adds the backup step from #417 to the upgrade offer from #420.
What changes
sonny setupwith flags asks nothing. Any agent or script can drive it:--provider chatgpt|anthropic|openai|openrouter|bedrock--profile NAMEfor Bedrock--key-stdin: a new key is read on stdin, never taken from argv--model PROVIDER/MODEL--import-mcp [codex,claude,opencode,kiro]: never a folder's own servers--json: prints what the machine has (ways to reach a model, other agents onPATH, MCP servers to bring, missing tools, setup steps) and what is setErrors are typed. ChatGPT needs a sign-in first. A Bedrock profile must exist; when there are profiles,
--profileis required. A key provider needs a key set or--key-stdin. When a running daemon's provider changes, setup says how to restart it.sonny-setupskill (sonny/skills/sonny-setup/SKILL.md, installed with Sonny's own skills). It shows any agent how to set Sonny up through those flags:--jsonaws sso loginwhen Bedrock needs itHand-off to another agent before any model is reachable. When no way to reach a model is ready, the provider picker adds a row "Let Claude Code / Codex / OpenCode / Kiro set up Sonny" for each one on
PATH.sonnybinary.claude "…",codex "…",opencode --prompt "…",kiro-cli chat "…"), not-porexec. One-shot modes can't ask the person anything and deny tools, and setup needs both.Backup, offered once.
setup::STEPSgainsbackup(sonny setup backup, done when the job and a remote exist).Checked
cargo test -p sonny: 525 passed. clippy-D warningsand fmt are clean.HOME:--key-stdin,--import-mcp claudeand--jsonall behave as described.claudethat sets a provider, carries on to the model step.backupas offered. With afile://bare repo URL, the first sync pushed a commit. The container has no systemd user manager, so installing the timer gives a typed error there.--jsonlists both steps.FEATURES.md: the "Welcome and first run" and
sonny setup backuprows are updated. docs/SONNY.md, the README and sonny/README.md are updated.