Repository navigation
docs: explain why Herdr's Agents pane omits tmux-backed workers - #3
Merged
Merged
Conversation
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.
Intent
The captain, 2026-09-27, verbatim: "herdr is not showing firstmate crewmates in the agents pane as it is supposed to. this is important because it is the only way the user can observe firstmate's secondmates and crewmates' activity. I do not know why we do not see the agents by default." Then: "please get started with herdr investigation and fix."
Context the captain shared, from another agent not connected to this codebase (unverified; it said it did not diagnose directly): his
tmux list-windows -t firstmatelists every second mate and worker as a tmux window; Herdr shows only his primary Claude pane and a diagnostic shell; that agent concluded Herdr's Agents pane tracks only Herdr-owned panes, so tmux-backed workers never appear, and suggested--backend herdrorconfig/backend.Firstmate's read-only facts at filing: this home has no config/backend and no lane home has one; the main firstmate session's environment has no HERDR_* variables, so backend auto-detection falls through to tmux; every live second mate and worker records a tmux endpoint (window=firstmate:fm-). On 2026-09-21 a spawn refused on herdr because the session's inherited HERDR_ named a closed Herdr workspace ("launcher pane could not be read"), and the fleet was then spawned with --backend tmux on purpose.
What Changed
docs/herdr-backend.md. It explains that Herdr's Agents pane lists only agents detected in Herdr terminal panes, so tmux-backed tasks do not appear there. It tells you to check the task's recorded backend first. It covers what backend auto-detection needs (HERDR_ENV=1on the spawning Firstmate process), how to setconfig/backend=herdrfor a home, the rule against faking or clearing a launcher identity, and theagent list/agent get/agent explainchecks for tasks already on Herdr.relaunchkeeps the recorded backend and cannot convert tmux endpoints to Herdr. It describes a gradual transition: select Herdr for new work and let existing tmux workers finish.HERDR_SESSION, operations go to thedefaultsession and a home-labeled parent workspace. It also links back to the launcher-identity rule. Adds a quick-reference row that points to the new "Missing agents" section.Risk Assessment
✅ Low: Documentation-only change whose round-2 fix correctly restores the 'for that reason' referent, keeps a single launcher-identity rule plus link, and whose new anchors and technical claims (HERDR_ENV detection, default session fallback, selection order) are verified against source.
Testing
The local command
bash bin/fm-test-run.sh tests/fm-backend.test.shfails atzsh: fm_backend_source herdr should load the adapter when sourced. It fails identically on a clean detached copy of freshly fetchedorigin/mainat050a44643af4f7c9b7a20b1bf165d4834d064c1b(exit 1 after the same passing selection cases). This documentation-only change does not fix that pre-existing failure.This is a docs-only change with no runtime product surface, so the verdict is no-surface. As a non-live check, I ran the real backend picker code in a disposable lab home. It confirmed each backend-selection claim in the new doc text: without markers the backend is tmux, HERDR_ENV=1 selects herdr, a nested TMUX marker wins over HERDR_ENV, config/backend=herdr selects herdr even outside Herdr, FM_BACKEND overrides config/backend, the session is 'default' when HERDR_SESSION is not set, and a legacy meta with no backend= line means tmux. All new anchor links resolve. I removed the lab afterwards, and the worktree is clean.
Evidence: Backend-selection doc-claim cross-check (real fm-backend.sh, throwaway lab home)
Source: Backend-selection doc-claim cross-check (real fm-backend.sh, throwaway lab home)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed (2) ✅
docs/herdr-backend.md:130- The new guidance on secondmates is incomplete, and it leads the reader to a setting that the system will undo. Line 128 says to set 'its local config/backend', and line 130 says a secondmate's spawns resolve against 'that secondmate's own home'. But config/backend is an inherited item that the primary controls (.agents/skills/secondmate-provisioning/SKILL.md lines 115-116; bin/fm-config-inherit-lib.sh). 'A present primary value always converges byte-exact into validated secondmate homes, and primary absence removes the destination.' This home has no primary config/backend today. So if someone writes config/backend=herdr directly into a secondmate home, the next bootstrap sweep or fm-config-push puts that copy in quarantine and removes it. The secondmate's crewmates then go back to tmux, which is the exact problem the captain reported. Fix: say that the primary home's config/backend decides the default for secondmates. For secondmates that are already running, tell the reader to push the change withbin/fm-config-push.sh, which delivers the config reread. Also say not to edit the secondmate home's copy.docs/herdr-backend.md:115- Intent check. The captain asked: 'please get started with herdr investigation and fix.' The change only adds documentation. It changes no code and no config. The captain's reported problem, 'herdr is not showing firstmate crewmates in the agents pane', stays the same after merge. The new section says why: every live worker and secondmate records a tmux endpoint, and 'relaunch ... cannot convert a tmux endpoint into a Herdr endpoint' (line 142). The only fix it offers is operational: an operator creates the gitignored primary config/backend=herdr, and only new spawns are affected. The captain must decide if this is enough. There are three options: (a) accept docs plus a manual config/backend change, and let the current tmux fleet finish while it stays invisible; (b) also authorize a backend migration path for live workers and secondmates, which is new machinery and outside this change; (c) accept some other visibility mechanism. The remedy needs the captain's approval. The docs themselves are not the defect.docs/herdr-backend.md:188- Simplification: lines 188-189 ('Having no launcher identity is different from claiming a stale one. Explicit backend selection does not bypass the launcher-identity checks...') say the same rule as lines 132-133 in the new 'Missing agents' section ('Do not fabricate a launcher identity... the unresolvable-identity refusal remains in force even when Herdr is explicitly selected'). The intent does not need the rule written twice. Keep one copy, or replace the second copy with a link.🔧 Fix applied.
1 warning still open:
docs/herdr-backend.md:188- The fix round put the new line 'A process that carries a stale pane identity still follows the launcher-identity rule.' between 'Two workspaces sharing it are an unresolvable placement and refuse rather than adopting either.' (line 186) and 'Avoid naming a personal workspacefirstmateor2ndmate-<id>for that reason.' (line 190). In the base file (050a446), 'for that reason' pointed to the duplicate-label refusal. It now points to the stale-pane-identity sentence. So the doc now says the wrong reason for not naming a workspacefirstmate. Fix: move the one-line link so it does not split the paragraphs. Put it after the 'Also avoid it because...' paragraph (line 191), or before 'That path needs the home label...' (line 185). Keep the text of the link line the same, as the firstmate asked. The content does not change.🔧 Fix applied.
✅ Re-checked - no issues remain.
git diff 050a446 83e3c80confirms that only docs/herdr-backend.md changed (40 added lines)Checked that every new link target heading exists: configuration.md#runtime-backend-configbackend--fm_backend, configuration.md#backend-selection-order, agent-control.md#transactional-relaunch, herdr-backend.md#unresolvable-launcher-identity, #agent-status-authority-and-relaunch, #firstmate-running-outside-herdr, #presentation-spaces, #missing-agentsCreated a throwaway lab home withbin/fm-lab-home.sh create $LAB, ranfm_backend_name,fm_backend_herdr_sessionandfm_backend_of_metafrom bin/fm-backend.sh and bin/backends/herdr.sh under 8 environment/config combinations, then ranrm -rf $LABRead the Transactional relaunch section of docs/agent-control.md to check the claim that relaunch keeps the recorded worktree and endpoint✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.