Skip to content

feat: model choice from the UI reaches the seat — and changing it restarts the seat - #1568

Merged
lilyshen0722 merged 4 commits into
mainfrom
feat/model-from-ui
Sep 6, 2026
Merged

lilyshen0722 merged 4 commits into
mainfrom
feat/model-from-ui

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

ADR-026 Phase 2, slice 4 — the second half of the original ask: hire an agent onto your computer AND choose what model it runs, from the UI.

What changed

UI (machine mode only): a Model select — Adapter default / Opus / Sonnet / Haiku. Aliases rather than version-pinned ids on purpose: the seat runs on the user's own CLI install, whose concrete model ids move under it; the aliases stay valid across releases. The choice rides the install as config.runtime.model. Default sends nothing.

Daemon: the work list already serves config.runtime (#1562), and the supervisor now writes environment: { model } into the token record it provisions — the exact field agent run hands the claude adapter, which turns it into --model on every spawn and on the session-recovery retry path (the drifting-copy trap the adapter's own tests pin).

Live reconfiguration: each tick compares the served model against the local record. A difference updates the record and restarts the seat through the exit event — the same D6 single-spawner path as crash recovery, so no code path can produce two runners. A row with no declared model never touches a hand-set environment (operator seats stay sovereign).

Known residue: the codex adapter has no model-pin flag yet (claude-only for now), and there's no UI to edit the model on an existing installation — the daemon side already handles changes, so that's a manage-surface slice.

Verification

5 new tests across both legs; cli 427 green + lint clean, frontend 616 green + 0 eslint errors. cli 0.1.32 → 0.1.33.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EtwYLMJAYuZ3grLQoXWMWT

lilyshen0722 and others added 4 commits September 5, 2026 21:25
…tarts the seat

The other half of Sam's ask ("no way to … config their model from UI").
The on-my-computer hire form gains a Model select (adapter default / opus /
sonnet / haiku — aliases, not version-pinned ids, because the seat runs on
the user's own CLI install whose model ids move). The choice rides the
install as config.runtime.model, the daemon work list already serves it, and
the supervisor now writes it into the token record's environment — the exact
field the claude adapter turns into --model on every spawn AND on the
session-recovery retry path.

Live edits propagate: on each tick the supervisor compares the served model
against the record; a difference updates the record and restarts the seat
through the exit event (the D6 path — no second spawner). A row with no
declared model never strips a hand-set environment.

5 new tests (mint carries environment.model, no-model invents nothing,
change→update+restart, hand-set env preserved, UI payload shape).
cli 427 green, frontend 616 green. cli 0.1.32 → 0.1.33.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtwYLMJAYuZ3grLQoXWMWT
@lilyshen0722
lilyshen0722 merged commit 3f7ffa5 into main Sep 6, 2026
14 checks passed
@lilyshen0722
lilyshen0722 deleted the feat/model-from-ui branch September 6, 2026 04:49
samxu01 pushed a commit that referenced this pull request Sep 6, 2026
Both #1561 and #1568 bumped cli/package.json (0.1.33 vs 0.1.34); take main and bump once more.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JavWvyVL478UfEhJjcfMgX
lilyshen0722 added a commit that referenced this pull request Sep 6, 2026
…1570)

* feat(cli): commonly daemon install — the login service (ADR-026 D1)

`commonly daemon install` registers the resident daemon as a login service:
a launchd LaunchAgent on macOS (KeepAlive — launchd restarts a dead daemon),
a systemd user unit on Linux (Restart=always). Both run the exact
interpreter + CLI entry that executed the install, resolved at install time —
a PATH lookup at boot would race version managers and silently run a
different install than the one the user tested. The unit's PATH carries
homebrew for the CHILDREN: seats spawn the user's claude/codex by name, and
launchd's default PATH would kill every seat at adapter detection while the
daemon itself looked healthy.

Install requires a registered daemon credential (a service without one just
crash-loops at boot). `daemon uninstall` unloads and removes; a failing
launchctl load surfaces instead of reporting success. 8 new tests on the
generated units and both flows, side effects injected. cli 0.1.34 → 0.1.35
(0.1.33 is claimed by open #1561, 0.1.34 by #1568).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtwYLMJAYuZ3grLQoXWMWT

* chore(cli): 0.1.36 — main took 0.1.35 while this was in flight

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EtwYLMJAYuZ3grLQoXWMWT

---------

Co-authored-by: Claude Fable 5 <[email protected]>
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.

1 participant