feat(dev): global Claude model + effort selector for new lab sessions #156
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#156
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
lab spawns every new session — manual Start, New instance, and AFK runs — with a hardcoded
--model claude-opus-4-8[1m] --effort max. This adds a global UI control to choose the Claude model and effort for newly-spawned sessions. Sessions already running are unaffected, and the machine-wide interactiveclaudedefault is left alone.Design (converged in a grill-me session)
settings.jsondefault is a read-only Nix-store symlink at runtime and is intentionally not touched.opus,sonnet,fable,haiku) so the list tracks the latest of each family and never goes stale. This deliberately reverses the current "pin the exact id" choice, now that the model is a visible, user-chosen setting.opus[1m](1M context, included on the plan). Sonnet stays plainsonnet(its 1M would bill extra usage credits, so it is left off). Fable is inherently 1M. Haiku has no 1M variant.best/opusplan/sonnet[1m].The authoritative contract is in the Agent Brief comment below.
Agent Brief
Category: enhancement
Summary: Add a global, persisted UI control that sets the Claude model and effort for every newly-spawned lab session (manual and AFK), leaving running sessions and the machine-wide claude default untouched.
Current behavior:
lab builds one fixed start command for spawned sessions — equivalent to
claude --remote-control <name> --permission-mode auto --effort max --model claude-opus-4-8[1m]. Both the manual Start path and the AFK-run base-argv helper read this single fixed command, so model and effort are effectively compile-time constants.Desired behavior:
opus[1m], "Sonnet" →sonnet, "Fable" →fable, "Haiku" →haiku.low,medium,high,xhigh,max, passed through verbatim. No per-model filtering — Claude Code clamps an unsupported level itself.opus[1m]+max, preserving today's behavior.Key interfaces:
Sessionstype, consumed by both its manual-start method and its AFK base-argv helper) must instead obtain model + effort dynamically at spawn time, via an injected accessor that reads the persisted setting. Both spawn paths must go through that accessor so AFK is covered automatically and the two paths can't drift.Storetype that already serialises per-project state to a JSON file) gains a single global (not per-project) setting — a model string and an effort string — with a getter that returns the documented defaults when unset, and a validated setter.<select>s) placed OUTSIDE the poll-morphed live region, so a background refresh never disturbs the user's selection (same rationale as the existing filter input). It auto-saves onchangethrough the existing intercepted-form/fetch path; a submit button is the no-JS fallback, hidden when JS is active.Acceptance criteria:
--model X --effort Y(verifiable from the spawned process argv).--model/--effort.opus[1m]+max.opus[1m],sonnet,fable,haiku.claudedefault (home-manager settings) is not modified.Out of scope:
claudedefault or anything in home-managersettings.json.bestandopusplanaliases, and a paidsonnet[1m]option — explicitly excluded.[1m]suffix (claude-code#45169) — noted, not lab's to fix.