cmux NEXT: a hosted cloud Chief's settings card reads and sets its model and effort
Summary
When you create a new Chief in cmux NEXT Home, it runs in the cloud. Its settings card said "Runs in the cloud", then showed a red "The server with this Chief is not connected.", and the Harness, Model and Effort pickers were empty. The card was looking for a paired server through its brain_place. A hosted Chief has no brain_place, so no server was ever found.
HomeChiefHostedEngine(CmuxNextHomeEngine) reads and sets model and effort through the hosted brain's own route (GET/PUT v1/chiefs/<agent>/brain). It offers the models and efforts that route accepts (Opus, Sonnet and Haiku 5.5; efforts off through max). The Harness row is hidden because the hosted brain runs a single engine. "Default" sets the brain's own default, because the route cannot clear a field.HomeChiefControl.engineSource()picks it for a cloud Chief that no paired server runs. Chiefs placed on a paired server stay onHomeChiefRemoteEngine. The placement comes from the Chief tab's Chiefs or from the directory (brain_placeis now parsed intoHomeChiefRecord), and the card picks its source again when the list answers.- Error messages now describe the real problem: signed out, cloud not reachable, or this cloud runs no Chiefs, instead of "the server ... not connected". A hosted brain that is off says it does not answer messages.
- Stop on a hosted Chief no longer claims there is a server. The cloud has no stop route for a hosted turn yet, so it returns
cloudStopUnsupported. - Reply path: New Chief created the Chief with its brain off. The brain starts off (chief-brain
configure), and nothing turned it on except the default Hosted Chief's own migration, so a new Chief never answered.createCloudChiefnow turns on the new Chief's brain, when this service runs Chief brains. - New strings are localized in
Home.xcstrings(21 locales).
Changelog
Fixed: A new Chief's settings now show and change its model and effort. A new Chief now answers messages.
Tests
HomeChiefHostedSettingsTests (CmuxNextAppTests) covers:
- source selection: hosted, placed and local
- Stop on a hosted Chief
- the card over a fake brain route: GET mapping, PUT body, Default, refusal, signed out, offline, brain off
On the base these tests do not compile, because the API they test does not exist there, so there is no separate red run. Results are posted in a PR comment.
Observed / Not run
- Observed:
prepush-gate.pypasses,lint-ios-package-conventions.shpasses, andlocalization_catalog.py checkadds no new parity errors. - Not run yet: the compile and tests on the fleet, and the tagged dev build. Results follow in comments.
- Already-created Chiefs whose brain is off stay off. The card now says so, but nothing turns them on.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the hosted cloud Chief's settings card so it reads and sets model and effort through the Cloud brain route, and new Chiefs now answer after creation.
- A hosted Chief (no
brain_place) uses the Cloud brain route; a Chief placed on a paired server keeps its server route, and the card hides the Harness row. - Errors now match the real state (signed out, cloud unreachable, cloud runs no Chiefs, brain off) instead of claiming a server is not connected.
- Stop on a hosted Chief returns a cloud-specific unsupported message.
- Creating a Chief now turns its brain on, since a new Chief's brain starts off and otherwise never answers.
- "Default" sets the brain's own default because the route cannot clear a field.