Repository navigation
fix: preserve lane ids in tmux pane titles - #18
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fa5e8f7. Configure here.
| ! tmux select-pane -t "$lane_pane" -T "$ID"; then | ||
| echo "error: could not set task $ID's tmux pane title" >&2 | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Title setup requires tmux 3.5
Medium Severity
allow-set-title is a tmux 3.5+ pane option, and a failed set-option aborts the spawn. Hosts still on 3.4 or older, including Ubuntu 24.04 LTS, then cannot launch any tmux-hosted harness. Window rename pinning already treats unknown options as best-effort, so this fail-closed check is a new hard dependency.
Reviewed by Cursor Bugbot for commit fa5e8f7. Configure here.
pearson-tfl
added a commit
that referenced
this pull request
Nov 14, 2026
…e fork's full CI (#45) * Make the fork's full CI green on stock Ubuntu 24.04 and current Pi Product: - fm-spawn: tmux before 3.5 has no allow-set-title, so every tmux spawn refused on Ubuntu 24.04's tmux 3.4. Skip only that unknown option and still set the lane title; any other title failure still refuses. - fm-pending-reply-lib: the inbox scan reused the name rec inside pipeline subshells, so ShellCheck flagged rec in tests that source the library. Tests: - Fake tmux fixtures in the secondmate, liveness, restart, wake-queue, tangle-guard and agy tests now answer #{pane_id} and accept the title commands, as #18 did for the shared fixtures. - spawn-loadout names the secondmate harness instead of relying on detection from the calling agent. - calm-pi's hand-built host carries pendingBashComponents, which Pi 1.5 sets in its constructor. - session-start's digest-death case triggers on fm-lock.sh's mkdir; the lock no longer runs ps. - ShellCheck fixes in spawn-loadout, omp live e2e and wedge-cap parity tests. * no-mistakes(document): Note old-tmux title fallback in regression scope * no-mistakes(ci): I fixed all four failing checks as Firstmate ruled, with no waivers. ci-3 (Stock macOS Bash snapshot compatibility). Rule broken: every script must parse under stock Bash 3.2. The only place in bin/fm-test-run.sh that broke it was a case arm inside a command substitution, at line 1589. I applied commit f6cfc38 from fm/ahr5999fm exactly as written, taking its patch from the GitHub API and applying it with git apply, so I did not have to fetch into the gate repository. The script now checks the file suffix with [[ ]] instead. ci-4 and ci-1 (Test coverage guard, and Behavior portable parallel 2). Rule broken: the largest modelled portable serial shard must stay under the 1200000 ms target. Main was at 1220565 ms with ten shards, and the same guard failure is what made tests/fm-test-run.test.sh fail inside the parallel 2 lane. The shard count is set in one place in bin/fm-test-run.sh (PORTABLE_SERIAL_SHARDS), and ci.yml's matrix must agree with it, because the runner refuses lane names that disagree. I copied only the shard-count part of commit 9fb3ef1: - PORTABLE_SERIAL_SHARDS is now 11. - The ci.yml serial matrix now runs shards 1 to 11. - docs/fm-test-portable-shards.md now describes sixteen long-lived Linux jobs (eleven serial), plus one line explaining why the lane grew. I left out 9fb3ef1's registration of the turn-end test. That covers its bin/fm-test-isolation-proof.sh hunk, the family entry and the timing hint, because that test does not exist on this branch. ci-2 (Full suite) only collects the other jobs' results, so it clears once they pass. Verified locally on Linux: - bin/fm-test-run.sh --check-coverage passes: 11 shards, largest 1109612 ms against the 1200000 ms target. - tests/fm-test-run.test.sh passes all 45 checks. - tests/fm-ci-workflow.test.sh passes all 18. - tests/fm-test-isolation-proof.test.sh passes all 9. - bash -n reads bin/fm-test-run.sh cleanly. Not checked: I could not run stock Bash 3.2 here because this host is Linux, so the macOS parse check itself is confirmed only by CI. The changes are left uncommitted for the outer executor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
--name <lane-id>to the shared Claude launch, covering workers and secondmates, fresh launches and exact-session resumes.allow-set-title off, and set its title to the lane id before starting any harness, including Pi.claude --name mainin the README's primary launch example.Both tmux mutations address a
%<id>pane, never a window name or pane index.Invalid pane identity or failed title setup stops before the harness launches.
Window names, other harness launch arguments, non-tmux backends, existing running panes, and AHR's CTX ledger hook are unchanged.
The separate AHR main-seat launcher was reported by Firstmate to already use
--name firstmate; this PR does not edit that external launcher.This PR targets pearson-tfl/firstmate:main only and must not be redirected to kunchenguid/firstmate.
Do not merge automatically.
Live Mac proof
Date: 2026-11-06.
Versions: tmux 3.7b, Claude Code 2.1.319, Pi 1.2.0.
All proof used a private task-owned tmux socket and disposable scratch panes, not existing fleet panes.
Claude used the generated launch shape with hooks, tools, skills and MCP disabled for the proof; Pi likewise disabled tools, extensions and context discovery.
Johns-Mac-Studiobefore launch; with--name ahrfmname-claudeand application titles enabled,✳ ahrfmname-claudeafterLANE_TITLE_PROOF_OKahrfmname-claude,allow-set-title off; repliedPINNED_CLAUDE_OKπ - ahrfmnamewith application titles enabledahrfmname-pi,allow-set-title off; repliedPI_TITLE_PROOF_OKThe title read-back used:
A same-window sibling isolation check also passed: a protected shell kept
ahrfmname-oscafter emittingprintf '\033]0;application-overwrite\007', while its unprotected sibling acceptedapplication-overwriteand retainedallow-set-title on.The private scratch server was stopped after captures were archived.
The active verification record is in
docs/verification/runtime-backends.md.Validation
Repository:
pearson-tfl/firstmate, branch:fm/ahrfmname, final head:fa5e8f7d5a5811a5ca0dc27de2e63b4627535d55.The live measurements used the matching production patch on base commit
33220962c90bc29de83e87af8e78f49b6b9a6c65, subsequently committed unchanged asf1d46c1e88132e9dd033163e0ab5dab85062b259.The core launch/loadout suite started at that implementation commit; its production and test files are byte-identical at final head.
The 13 passing fixture compatibility suites use
c40571676df4c4c61b4d2294abfbefbb17eb383c, with their selected files byte-identical at final head.The secondmate suite initially exposed legacy command expectations; those are corrected and rerun alongside the Orca suite at final head.
The ledger suite uses
33621dee2311b8084abacc743ad523729642a067, with the tested files unchanged at final head.Final lint and documentation checks use final head.
bash bin/fm-test-run.sh tests/fm-spawn-dispatch-profile.test.sh tests/fm-spawn-loadout.test.sh(2 suites).bash bin/fm-test-run.sh tests/fm-fleet-ledger.test.sh.bash bin/fm-lint.shwith pinned ShellCheck 0.11.0 and actionlint 1.7.12.bash bin/fm-doc-audience-check.sh.git diff --check.tests/fm-test-fixtures.test.sh).tests/fm-secondmate-harness.test.shandtests/fm-backend-orca.test.sh(2 suites, no skipped suite).The new matrix checks shell-parsed Claude
--nameand exact session identity, plus pane-id-only title mutations for Claude and Pi workers/secondmates on fresh and resumed launches.Negative cases cover invalid pane identity and either title mutation failing.
Fish is not installed on this Mac, so the existing fish-specific execution check capability-skipped; its static syntax check still ran.
One existing secondmate Cursor-resolution case also skipped because its executable was not resolvable in the test environment.
Earlier exploratory runs were incomplete or invalidated while editing and are not counted as passing evidence.
This is the explicitly requested direct PR; no-mistakes was not run.
Review
Two complete-branch self-review rounds, including the final fixture-only follow-ups.
No independent reviewer was commissioned.
Note
Medium Risk
Changes alter tmux bootstrap for every spawn and fail fast on title errors, so backend misconfiguration could now block launches; coverage is strong but this path is execution-critical.
Overview
Firstmate now pins lane identity end-to-end: tmux launches resolve the owning pane id, disable application title overrides on that pane only, and force its title to the lane id before any harness starts, aborting spawn if pane identity or either tmux mutation fails so users never lose track of which task owns a window.
Claude workers and secondmates additionally receive shell-quoted
--name <lane>in the generated launch (Orca, secondmate suites, and dispatch-profile expectations updated accordingly), and the README’s primaryclaudeexample mirrors that naming guidance.Regression + documentation coverage expanded: a new dispatch-profile matrix asserts pane-scoped title commands plus
--name, many tmux fixtures now answer#{pane_id}probes, anddocs/verification/runtime-backends.mdrecords the manual Claude/Pi proof.Reviewed by Cursor Bugbot for commit fa5e8f7. Bugbot is set up for automated code reviews on this repo. Configure here.