From 004df7a1c940028e646da9ece50115c9a4082073 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 10 Jun 2026 01:10:10 +0200 Subject: [PATCH 1/2] feat(#1595): add hyperhive.effortLevel baseline default option Per-agent enum option (medium|high|xhigh, default medium) rendered into the HYPERHIVE_EFFORT_LEVEL env var. The harness resolves effort as operator-override-file -> this env -> medium and passes it to claude --effort at turn launch (harness read+apply tracked separately). Same declarative-default + runtime-override shape as hyperhive.model. Umbrella: operator-controlled claude effort. --- nix/templates/harness-base.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index e58829d8..d80fc572 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -134,6 +134,29 @@ in ''; }; + options.hyperhive.effortLevel = lib.mkOption { + type = lib.types.enum [ + "medium" + "high" + "xhigh" + ]; + default = "medium"; + example = "high"; + description = '' + Baseline claude effort level for this agent. Rendered into the + `HYPERHIVE_EFFORT_LEVEL` environment variable; the harness resolves + 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. + ''; + }; + options.hyperhive.allowedBashPatterns = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; @@ -912,6 +935,10 @@ in # surfaces it to the frontend; an empty value falls back to the # built-in default list. HIVE_AVAILABLE_MODELS = lib.concatStringsSep "," config.hyperhive.availableModels; + # HYPERHIVE_EFFORT_LEVEL is the per-agent baseline effort (see + # hyperhive.effortLevel). The harness resolves operator-override-file + # → this env → "medium" and passes it to claude --effort at turn launch. + HYPERHIVE_EFFORT_LEVEL = config.hyperhive.effortLevel; HIVE_ASSETS_DIR = "${pkgs.hyperhive-assets}/share/hyperhive"; SHELL = "${pkgs.bashInteractive}/bin/bash"; } From 7eb1cef62b8600a07c21ed9421c611e8416f3de1 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 10 Jun 2026 01:18:45 +0200 Subject: [PATCH 2/2] fix(#1595): rename effort env to HIVE_DEFAULT_EFFORT Match the harness reader landed in #1600 (configured_effort reads HIVE_DEFAULT_EFFORT, mirroring HIVE_DEFAULT_MODEL). Was HYPERHIVE_EFFORT_LEVEL in the first cut; damocles standardized the name on the HIVE_DEFAULT_* convention. --- nix/templates/harness-base.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index d80fc572..6f563dd9 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -144,7 +144,7 @@ in example = "high"; description = '' Baseline claude effort level for this agent. Rendered into the - `HYPERHIVE_EFFORT_LEVEL` environment variable; the harness resolves + `HIVE_DEFAULT_EFFORT` environment variable; the harness resolves effort as operator-override-file → this env → built-in `"medium"`, and passes the result to `claude --effort` at turn launch. @@ -935,10 +935,10 @@ in # surfaces it to the frontend; an empty value falls back to the # built-in default list. HIVE_AVAILABLE_MODELS = lib.concatStringsSep "," config.hyperhive.availableModels; - # HYPERHIVE_EFFORT_LEVEL is the per-agent baseline effort (see + # HIVE_DEFAULT_EFFORT is the per-agent baseline effort (see # hyperhive.effortLevel). The harness resolves operator-override-file # → this env → "medium" and passes it to claude --effort at turn launch. - HYPERHIVE_EFFORT_LEVEL = config.hyperhive.effortLevel; + HIVE_DEFAULT_EFFORT = config.hyperhive.effortLevel; HIVE_ASSETS_DIR = "${pkgs.hyperhive-assets}/share/hyperhive"; SHELL = "${pkgs.bashInteractive}/bin/bash"; }