Skip to content

feat(orchestration): worker-start new worktrees default to a generated name - #35363

Merged
Jinwoo-H merged 1 commit into
mainfrom
jinwoo/worker-start-default-name
Oct 28, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
jinwoo/worker-start-default-name

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​140 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​140
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​113 $\color{#cf222e}{\Huge{\mathbf{−}}}$​47 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​66

ELI5

When a coordinating agent starts a worker in a new workspace, it no longer has to invent a name. Orca names the workspace the same way it does when you create one without typing a name, and renames it from the work once the worker starts, just like a workspace you made yourself.

What Changed

Before: orca orchestration worker-start --worktree new-child (or new-top-level) without --name failed with "New worktrees require --name." Coordinating agents often hit this on their first start and had to retry.

After:

  • With no --name, the runtime picks a sea-creature name with the same picker the new-workspace composer uses: it skips names already used by live workspaces and names retired by deleted workspaces in that project, and moves to the next tier when a tier is used up. The create request is marked as a generated name, so the existing create path applies the retired-name registry and collision fallback, and the existing "rename branch from work" flow renames the branch and title after the worker's first turn (when that setting is on). An explicit --name is passed through unchanged.
  • The worktree entry in the start receipt's effects now carries the created workspace's name, and the plain-text output prints Created workspace: <name>, so the coordinator can tell the user where the worker is running.
  • Connected-server starts (--on <server> --worktree new-top-level) no longer need --name either; the name is picked on the server that creates the worktree.
  • The composer's picker moved from the mobile app into the shared module so desktop runtime and mobile use one implementation. Mobile behavior is unchanged.
  • The orchestration placement guide and the worker-start help no longer show --name as needed.

Why

The name is generated on the host that creates the worktree, so it is checked against that host's live and retired names, including SSH projects. Reusing the composer's picker and marking the request as a generated name means the retirement registry and first-work rename apply without any new naming logic. The other option was to have the CLI make up a name before sending the request. That would not see the host's retired names and would still fail against an older server.

Older runtimes: a new CLI talking to an older runtime or connected server gets that runtime's existing clear error asking for --name, so nothing breaks. Folder projects are still refused with the existing folder message, which now appears instead of the --name error.

Linked Issue

N/A (maintainer change)

Visual Proof

N/A: CLI and runtime behavior only. The new receipt line is covered by a formatter test.

Testing

  • Automated tests added/updated
  • worker-worktree-creation.test.ts: no name gets a generated creature name that avoids live names in any project and retired names; spent tiers are skipped; an explicit name is passed through as typed; the receipt's worktree effect names the workspace.
  • runtime-local-worktree-create.test.ts: a workspace created from the worker's name request is marked Orca-created and is renamed (branch and title) by the real first-work rename flow.
  • worker-output.test.ts: plain output prints the created workspace.
  • Ran pnpm tc, typecheck:ci, mobile typecheck, oxlint (type-aware + anti-slop), check:code-quality:changed, and the pr.yml static check scripts locally. Tested on macOS.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Two nameless starts launched at the same instant can pick the same name. That is the same race two composer creates have. If one create has already landed, the other falls back to the next tier. If both are mid-create, one can fail and the coordinator retries it. I did not add a reservation for this.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

New orchestration worktrees can start without --name. The creating host picks a creature name and marks it as generated.

  • Nameless worker starts now get a name from the host creating the workspace.
  • Worker-start output now names the created workspace.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Worker start] --> B{Explicit name?}
  B -->|Yes| E[Create worktree]
  B -->|No| C[Creating host reads live and retired names]
  C --> D[Pick creature name and mark generated]
  D --> E
  E --> F[Existing collision and retirement checks]
  F --> G[Receipt includes created workspace name]
Loading

Reviews (1) · Last reviewed commit: "feat(orchestration): worker-start new wo..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c1a4b69-a0b1-402d-8f4f-1e4888eaf827
Commits

Reviewing files that changed from the base of the PR and between f7a114a and 8d83900.

Files selected for processing: 14
  • mobile/src/components/worktree-name-suggestion.ts
  • skill-guides/orchestration/references/placement-and-remote.md
  • src/cli/bundled-skill-guides.ts
  • src/cli/handlers/orchestration/worker-output.test.ts
  • src/cli/handlers/orchestration/worker-output.ts
  • src/cli/specs/orchestration-worker-specs.ts
  • src/main/runtime/rpc/methods/orchestration/federation/federated-worker-agent-launch.ts
  • src/main/runtime/rpc/methods/orchestration/federation/federation-effects.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-start-validation.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-topology.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-worktree-creation.test.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-worktree-creation.ts
  • src/main/runtime/runtime-local-worktree-create.test.ts
  • src/shared/worktree-name-suggestion.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

Worker worktree creation now accepts an omitted name and generates one from existing and retired worktree names. Created worktree effects include the name. Worker-start output reports the created workspace, and the orchestration guides describe the optional --name argument.

Priority: Normal

Merge Risk: Low · up to 8d839

Concurrent nameless starts can occasionally collide, requiring one start to be retried. The change is otherwise mergeable with awareness of this race.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: worker-start now assigns generated names to new worktrees when --name is omitted.
Description check Passed The description is complete and aligned with the template. It explains the user-visible behavior, implementation, rationale, compatibility, testing, documentation updates, known race behavior, and che…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is complete and aligned with the template. It explains the user-visible behavior, implementation, rationale, compatibility, testing, documentation updates, known race behavior, and checklist status. The maintainer-specific Linked Issue exception is addressed with N/A.

Full details: Docstring Coverage

Explanation

Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 10 functions across 13 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Jinwoo-H
Jinwoo-H merged commit 93ff483 into main Oct 28, 2026
69 of 71 checks passed
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