Keep a named Cloud machine's prompt name instead of flipping to its slug - #15288
Conversation
Red: /api/vm/reflection/name answers the slug while create and rename write the display-name form, so a named machine's prompt flips back. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The guest's cmux-prompt-sync re-fetches /api/vm/reflection/name every 30 s and writes it to /etc/cmux/vm-name. That route answered the generated slug while create and rename write the display-name form, so a named machine's prompt flipped back to its slug. Both now use vmPromptName. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 3 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
vmPromptName moves to services/vms/promptName.ts, so the route every VM polls each 30 s no longer loads guestPrompt's bashrc and prompt assets. guestPrompt re-exports it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review (subagent, correctness first): nothing serious. Checked:
Fixed:
Left:
After the change: route and prompt tests pass (17), |
|
Merge receipt for |
0e298fb ci: wait for the product's canonical root instead of compiling beside it (manaflow-ai#15379) 3088273 ci: UI test runs adopt compile admission's product, skip the re-upload, and report progress (manaflow-ai#15331) b681e7e Keep a pending banner quiet once its pane is focused (manaflow-ai#15357) 03a2f6e Record that cloud_vm_sessions.attachment_count is cumulative (manaflow-ai#15321) 48258b4 fix(iroh-v2): check the team socket cap before opening the session (manaflow-ai#15340) 2638d56 Agent activity reorder follow-ups: group on-top check, search, subtitle (manaflow-ai#15362) 9ed83fd Dogfood journey: record whether a paused Cloud machine is asleep (manaflow-ai#15293) 7171ea8 Add app.tabBarVisibility to hide the pane tab bar when a pane has one tab (manaflow-ai#15294) 8743ec8 test: stop Computer Use onboarding tests waiting out the helper status deadline (manaflow-ai#15329) 6e4f1da ci: drain the snapshot's owned queue by what the machines finished since (manaflow-ai#15374) 9373164 ci: queue a pull request's admission for a root runner when Blacksmith's wait is longer (manaflow-ai#15376) 634a155 test: expect injected pane attention accent (manaflow-ai#15370) cd030e9 Keep a named Cloud machine's prompt name instead of flipping to its slug (manaflow-ai#15288) 24ee0ee Exit 1 when cmux terminal screen wait times out (manaflow-ai#15282) 1b857ac test: cover a live Codex turn owner keeping its turn on SessionStart (manaflow-ai#13588) 56ec600 PR media: prune media of long-closed pull requests (manaflow-ai#15364) 4898cde ci: bound the SwiftPM scratch holder and cache scratch sizes (manaflow-ai#15366) # Conflicts: # .github/workflows/ci-guards.yml # .github/workflows/ci.yml # .github/workflows/test-e2e.yml
Summary
A Cloud machine created or renamed with a display name shows
cmux@<that name>in its prompt at first. Within about 30 seconds the prompt switches to the generated slug (cmux@hardy-pink-jay).Cause: two writers of
/etc/cmux/vm-namedisagree.vmPromptIdentity(row).name, which is the display name as a slug, falling back to the generated slug.cmux-prompt-syncre-fetchesGET /api/vm/reflection/nameevery 30 s and writes that answer. The route returnedreflectionMachineName(vm), which is always the generated slug.Both now use one function,
vmPromptName. The change is server-side only, so it reaches running machines without a guest upgrade. Machines without a display name are unchanged: they still get their slug.Evidence
Found by the Cloud dogfood journey on staging (run 36402933616). The same terminal, captured before pause and after resume:
Testing
web/tests/vm-reflection-name-route.test.ts, committed first and red: the route answeredhardy-pink-jayfor a machine named "Dogfood Box". It is green after the fix. The unnamed case still answers the slug.bun testpasses across the new route test andtests/vm-guest-prompt.test.tsandtests/vm-reflection.test.ts(32 tests).bun run typecheckandbun run lint:complexityare clean. eslint on the touched files is clean.Changelog
Fixed: a named Cloud machine's terminal prompt no longer switches back to its generated name after about 30 seconds.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Keeps a named Cloud machine's prompt (
cmux@<name>) stable instead of flipping to its generated slug after about 30 seconds.cmux-prompt-syncre-fetches/api/vm/reflection/nameevery 30 seconds, and that route answered the slug while create and rename write the display name. Both writers now usevmPromptName(vm).vmPromptNamelives in its own module so the polled route no longer loads guestPrompt's bashrc and prompt assets.Written for commit 9e7035c. Summary will update on new commits.