Skip to content

Effort defaults for leads, tasks and judges in ~/.agent/config.toml - #251

Merged
lydakis merged 5 commits into
mainfrom
claude/project-thread-u41bgl
Oct 28, 2026
Merged

lydakis merged 5 commits into
mainfrom
claude/project-thread-u41bgl

Conversation

@lydakis

@lydakis lydakis commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

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/env keeps provider keys only. Sonny imposes nothing: with nothing set, everything runs as it does today.

[judge]
model = "openai/gpt-6-luna"   # who judges for the approver and the lookout
effort = "low"

[sonny]
lead_effort = "medium"        # a new lead's effort
task_effort = "high"          # each new task's
What ~/.agent/config.toml .agents/project.toml (per project, wins)
A new lead's effort [sonny] lead_effort effort
Each new task's model (the lead's) threads_model
Each new task's effort [sonny] task_effort threads_effort
Approver and lookout judge [judge] model, effort

The reader. agent_client::config provides path(), load() and read(path). A missing file gives the defaults, and an unknown table or key is refused by name, the same way project.toml is. The first-run setup PR (#253) adds top-level model/provider and 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"}. Now sonny task fills in --model and --effort itself, unless the lead names them:

  • Model: the project's threads_model, else the lead's.
  • Effort: the project'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/--effort only 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, else AGENT_EFFORT when its model came from AGENT_MODEL (the CLI's rule), else the model's own. This covers both sonny in a new folder and sonny project add.

Judges. The approver takes --judge and --effort, falling back to the config's [judge] and then AGENT_MODEL. The lookout takes --judge, falling back to [judge] model and then the lead's model, with [judge] effort. The effort is part of the lookout judge bot's name, so a change takes effect. The AGENT_JUDGE env 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):

  • In project.toml, reasoning is now effort and threads_reasoning is now threads_effort. An old key is refused, and the error names the new key.
  • threads_effort no longer needs threads_model, and project add --threads-effort works on its own.
  • AGENT_JUDGE is gone; use [judge] model instead.

No visible UI change, so there are no screenshots.

Tests:

  • New unit tests for the config reader, the task defaults (with_defaults), the renamed keys and the effort of a kept project file.
  • test_approvals now sets the failing judge through a config file in HOME. ApprovalCliTests and AutoApproverTests pass against a release build.
  • cargo test --workspace passes locally, except the three sandfs tests that need fusermount3, which this machine lacks (CI installs fuse3).
  • Fmt and clippy are clean.

🤖 Generated with Claude Code

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
@lydakis lydakis self-assigned this Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T02:40:48.982050Z e173b51 New commits
🔒 Security Review ✅ Completed 2026-10-28T02:42:21.549229Z e173b51 New commits
ℹ️ 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" or "@codex security review".

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
@lydakis lydakis changed the title Effort defaults for leads, tasks and judges in ~/.agent/env Effort defaults for leads, tasks and judges in ~/.agent/config.toml Oct 28, 2026

lydakis commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

The rust job on e97d3df failed in one test, html::tests::a_page_draws_and_its_blank_end_is_cut, with "Chrome took longer than 15s" (sonny/src/html.rs:136). That's the headless Chrome page render, which this PR doesn't touch, and the same test passed on this PR's first commit. I have no fix to port for a slow Chrome start on the runner. Main also moved on, so I merged it (69be88b, clean merge, local fmt/clippy/tests pass except the FUSE-only sandfs tests), and that push re-runs CI. If the test fails again on that head, I'll treat it as real.


Generated by Claude Code

# Conflicts:
#	client/src/project.rs
#	sonny/README.md
@lydakis
lydakis merged commit 572debb into main Oct 28, 2026
3 checks passed
lydakis pushed a commit that referenced this pull request Oct 28, 2026
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
lydakis pushed a commit that referenced this pull request Oct 28, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants