From d8cdd3d259cf38ac82506013b6032b5a87c8dcda Mon Sep 17 00:00:00 2001 From: autocommit Date: Wed, 27 May 2026 14:02:48 -0700 Subject: [PATCH] =?UTF-8?q?feat(orchestrator):=20=E2=9C=A8=20Add=20host=20?= =?UTF-8?q?label=20parameter=20to=20bootstrap=20registration=20for=20per-h?= =?UTF-8?q?ost=20instance=20identification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/claire/orchestrator/bootstrap.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/claire/orchestrator/bootstrap.py b/src/claire/orchestrator/bootstrap.py index 8eb9f98..58fd9fb 100644 --- a/src/claire/orchestrator/bootstrap.py +++ b/src/claire/orchestrator/bootstrap.py @@ -347,8 +347,9 @@ def _send_kick(*, rcl: Rclaude, cwd: str) -> None: ) -def _register_remote_control(*, rcl: Rclaude, cwd: str) -> None: - """Register the orchestrator session with claude.ai/code. +def _register_remote_control(*, rcl: Rclaude, cwd: str, host_label: str) -> None: + """Register the orchestrator session with claude.ai/code as + `claire@` so per-host Claires are distinguishable in the browser. `/remote-control` is a Claude *slash command* — it only takes effect delivered as literal input, never from prose. The bootstrap kick is a @@ -356,9 +357,14 @@ def _register_remote_control(*, rcl: Rclaude, cwd: str) -> None: text), so the command itself is delivered as a separate send. This is what makes the orchestrator appear as a remote session the user can drive from the browser / claude.ai/code. + + `host_label` is the canonical fleet label for the machine running this + orchestrator (apricot / plum / …) — caller passes + `cfg.this_host_label()` for local spawns, `cfg.orchestrator.host` for + remote spawns. """ rcl.send( - text="/remote-control claire", + text=f"/remote-control claire@{host_label}", match=_cwd_slug(cwd), yes=True, dry_run=False, @@ -593,8 +599,17 @@ def ensure_running( # Register with claude.ai/code so the user can drive the orchestrator # from the browser. Non-fatal — it still works via Claire's chat # regardless of whether remote-control registration succeeds. + # The registration name is `claire@` so per-host Claires stay + # distinct in the browser dropdown. + host_label = ( + cfg.orchestrator.host + if is_remote + else cfg.this_host_label() + ) try: - _register_remote_control(rcl=rcl, cwd=effective_cwd) + _register_remote_control( + rcl=rcl, cwd=effective_cwd, host_label=host_label, + ) except RclaudeError: pass return new_uuid