feat(#2220): add low and max effort levels

claude --effort now accepts low, medium, high, xhigh, max.
Expand EFFORT_LEVELS from 3 to 5, update NixOS enum + description,
and fix the stale doc comment in web_ui.rs.

Closes #2220
This commit is contained in:
atlas 2026-07-04 17:52:48 +02:00 committed by mara
commit 742f4ef916
3 changed files with 10 additions and 8 deletions

View file

@ -583,7 +583,7 @@ pub const DEFAULT_EFFORT: &str = "medium";
/// Valid claude `--effort` levels, ascending. The operator picker is
/// constrained to these; [`is_valid_effort`] guards the persist path.
pub const EFFORT_LEVELS: [&str; 3] = ["medium", "high", "xhigh"];
pub const EFFORT_LEVELS: [&str; 5] = ["low", "medium", "high", "xhigh", "max"];
/// True iff `level` is one of [`EFFORT_LEVELS`].
#[must_use]

View file

@ -461,7 +461,7 @@ struct StateSnapshot {
/// runtime via `POST /api/effort`; applies on the next session.
effort: String,
/// Selectable effort levels for the picker, ascending. Fixed set
/// (`medium`, `high`, `xhigh`) — sourced from
/// (`low`, `medium`, `high`, `xhigh`, `max`) — sourced from
/// [`crate::events::EFFORT_LEVELS`], not operator-configurable like
/// `available_models`. The frontend renders one button per entry.
available_efforts: Vec<String>,

View file

@ -219,9 +219,11 @@ in
options.hyperhive.effortLevel = lib.mkOption {
type = lib.types.enum [
"low"
"medium"
"high"
"xhigh"
"max"
];
default = "medium";
example = "high";
@ -231,12 +233,12 @@ in
effort as operator-override-file this env built-in `"medium"`,
and passes the result to `claude --effort` at turn launch.
`"medium"` (the default) keeps token spend low and works well with
the harness across families. `"high"` matches the current platform
default; `"xhigh"` is recommended for coding / high-autonomy work on
capable models (Opus 4.8+) at higher token cost. The operator can
override at runtime per-agent via the web UI (applied on the next
session); any rebuild that changes this option resets that override.
Ascending scale: `"low"` (minimal thinking budget), `"medium"`
(default balanced), `"high"` (platform default), `"xhigh"`
(recommended for autonomous coding on capable models), `"max"`
(maximum thinking budget, highest cost). The operator can override
at runtime per-agent via the web UI (applied on the next session);
any rebuild that changes this option resets that override.
'';
};