Repository navigation
Effort defaults for leads, tasks and judges in ~/.agent/config.toml - #251
Conversation
SONNY_LEAD_EFFORT sets a new lead's effort and SONNY_TASK_EFFORT each new task's; sonny task applies them in code, so the lead's prompt no longer carries --model/--effort flags. AGENT_JUDGE_EFFORT sets the approver's and the lookout's judge effort. Unset, everything runs as before: a task takes its lead's effort on its lead's model. project.toml's reasoning key is now effort (threads_reasoning is threads_effort), and threads_effort no longer needs threads_model. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFV7aAfUxBjfFhwoie
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. |
# Conflicts: # sonny/src/task.rs
agent_client::config reads ~/.agent/config.toml (missing = defaults, unknown keys refused by name): [judge] model/effort for the approver and the lookout, [sonny] lead_effort/task_effort. AGENT_JUDGE and the env keys this PR added are gone; ~/.agent/env keeps provider keys. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFV7aAfUxBjfFhwoie
|
The Generated by Claude Code |
# Conflicts: # client/src/project.rs # sonny/README.md
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
start_task now takes its defaults from #251's with_defaults (the project's threads_model/threads_effort, then [sonny] task_effort, then the lead's), new_project takes [sonny] lead_effort, and threads_effort may come without threads_model. /background removes subscriptions with subs::remove, which the subscriptions tool shares. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGErsjQZRay4MEvYNpr
Leads and tasks can now run at different efforts, and so can the judges. The defaults live in a new settings file,
~/.agent/config.toml, which works Codex-style.~/.agent/envkeeps provider keys only. Sonny imposes nothing: with nothing set, everything runs as it does today.~/.agent/config.toml.agents/project.toml(per project, wins)[sonny] lead_efforteffortthreads_model[sonny] task_effortthreads_effort[judge] model,effortThe reader.
agent_client::configprovidespath(),load()andread(path). A missing file gives the defaults, and an unknown table or key is refused by name, the same wayproject.tomlis. The first-run setup PR (#253) adds top-levelmodel/providerand a set-if-absent writer on top of it.Tasks. Until now a task inherited through the prompt: the task rule told the lead to pass
--model "$AGENT_MODEL" ${AGENT_EFFORT:+--effort "$AGENT_EFFORT"}. Nowsonny taskfills in--modeland--effortitself, unless the lead names them:threads_model, else the lead's.threads_effort, else[sonny] task_effort, else the lead's effort when the task runs the lead's model, which is today's behaviour.The task rule now only says where tasks work, and the start rule says the lead adds
--model/--effortonly when the person asks. So the prompt gets shorter.Leads. A new lead's effort is the project file's
effort, else[sonny] lead_effort, elseAGENT_EFFORTwhen its model came fromAGENT_MODEL(the CLI's rule), else the model's own. This covers bothsonnyin a new folder andsonny project add.Judges. The approver takes
--judgeand--effort, falling back to the config's[judge]and thenAGENT_MODEL. The lookout takes--judge, falling back to[judge] modeland then the lead's model, with[judge] effort. The effort is part of the lookout judge bot's name, so a change takes effect. TheAGENT_JUDGEenv var is removed. This came up in an onboarding report: Sonny started the approver without--effort, and the lookout judge had no effort setting.Breaking (no compat, per the repo's rule):
project.toml,reasoningis noweffortandthreads_reasoningis nowthreads_effort. An old key is refused, and the error names the new key.threads_effortno longer needsthreads_model, andproject add --threads-effortworks on its own.AGENT_JUDGEis gone; use[judge] modelinstead.No visible UI change, so there are no screenshots.
Tests:
with_defaults), the renamed keys and the effort of a kept project file.test_approvalsnow sets the failing judge through a config file inHOME.ApprovalCliTestsandAutoApproverTestspass against a release build.cargo test --workspacepasses locally, except the three sandfs tests that needfusermount3, which this machine lacks (CI installs fuse3).🤖 Generated with Claude Code