Skip to content

Linear start: an optional name labels the new pane and pins it - #62

Merged
tdody merged 1 commit into
mainfrom
thibaultdody/linear-start-name
Nov 17, 2026
Merged

tdody merged 1 commit into
mainfrom
thibaultdody/linear-start-name

Conversation

@tdody

@tdody tdody commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Another app can now name the Claude that POST /api/linear/start starts. Today the narrator names that pane from its work, and the name changes as the work moves. todo-hub will send the issue's ID and a few words, for example eng-123-grade-rebin, so the pane is easy to find on the rail.

Changes

  • StartBody takes an optional name (routes/linear.py). The route strips it, and an empty name becomes None.
  • branch_spawn.spawn passes name to channels.spawn_claude_with_prompt. That function already gives the window the name (new-window -n) and pins it (name_pinned), as spawn_claude(name=…) does. Prepare passes no name, so prepare does not change.
  • A Claude already on the branch keeps its name. The route answers existing before any spawn, as before.
  • docs/narrator.md lists the route as the fourth writer of the pin.

Assumptions to challenge

  • A name is always pinned. A caller that wants the narrator to name the pane sends no name.
  • The route does not check the name. A name with a newline goes to tmux as it is, while set_name refuses one. The only caller today, todo-hub, sends lowercase words and dashes.
  • A caller that sends no name gets the old behavior. An older periscope ignores the field, because StartBody does not forbid extra fields.

Test plan

  • uv run pytest -q: 2255 pass. New: test_a_name_goes_to_the_spawn. test_start_spawns_claude_in_the_worktree now checks that a start without a name passes None.
  • bin/check: ruff, ruff format and ty pass. Biome did not run in the new worktree (no node_modules). This PR changes no JS.
  • A real start with a name on the dev backend. See the comment for the result.
  • CI: check and pytest pass. The first pytest run failed on a timing test in test_state_hub.py, which this PR does not touch; the rerun passed.

🤖 Generated with Claude Code

… new pane and pins it

branch_spawn.spawn passes the name to spawn_claude_with_prompt, which already
names the window and pins it against the narrator. A Claude already on the
branch keeps its name. docs/narrator.md lists the route as a fourth pin writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tdody

tdody commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

I ran a real start with a name on the dev backend (:17375), from this branch.

Request: POST /api/linear/start for ENG-1 on a test branch name-check in a test repo, with "name": "eng-1-name-check".

Result:

  • Periscope answered {"mode": "spawned", ...} and made the worktree.
  • The new tmux window is named eng-1-name-check.
  • In /api/state, the window has name_pinned: true and linked_linear: "ENG-1".
  • The new Claude got the prompt and answered.

After the check, I removed the window, the worktree and the branch, and I stopped the dev backend.

🤖 Generated with Claude Code

@tdody
tdody merged commit d0a29c0 into main Nov 17, 2026
3 of 4 checks passed
@tdody
tdody deleted the thibaultdody/linear-start-name branch November 17, 2026 23:58
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