daemon: call reconcile_window_names() each tick#12
Merged
Conversation
reconcile_window_names() relabels any window running claude to its cwd basename, but it was dead code — defined in agent_manager.py and never invoked. The only rename path was start_agent() (the dashboard Start button), so a claude session started/resumed by hand in tmux kept its stale window name and showed wrong in the sidebar. Wire it into the cmd_run() daemon loop right after scheduler.tick(). It's idempotent (acts only on a name mismatch) and wrapped so a tmux hiccup can't take down the loop. Logs only when it actually renames. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Devail1
added a commit
that referenced
this pull request
Jun 22, 2026
reconcile_window_names() relabels any window running claude to its cwd basename, but it was dead code — defined in agent_manager.py and never invoked. The only rename path was start_agent() (the dashboard Start button), so a claude session started/resumed by hand in tmux kept its stale window name and showed wrong in the sidebar. Wire it into the cmd_run() daemon loop right after scheduler.tick(). It's idempotent (acts only on a name mismatch) and wrapped so a tmux hiccup can't take down the loop. Logs only when it actually renames. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Devail1
added a commit
that referenced
this pull request
Jun 23, 2026
reconcile_window_names() relabels any window running claude to its cwd basename, but it was dead code — defined in agent_manager.py and never invoked. The only rename path was start_agent() (the dashboard Start button), so a claude session started/resumed by hand in tmux kept its stale window name and showed wrong in the sidebar. Wire it into the cmd_run() daemon loop right after scheduler.tick(). It's idempotent (acts only on a name mismatch) and wrapped so a tmux hiccup can't take down the loop. Logs only when it actually renames. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
reconcile_window_names()(inchela/agent_manager.py) relabels any tmux window runningclaudeto its cwd basename — but it was dead code: defined and tested in isolation, yet never invoked by the daemon. The only code path that renamed a window wasstart_agent()(the dashboard Start button).Consequence: a
claudesession started or resumed by hand inside a tmux window kept its stale window name, so the dashboard sidebar showed the wrong label (e.g. a window resumed in~/stayedresearcherinstead of becomingec2-user).Fix
Wire
reconcile_window_names()into thecmd_run()daemon loop, right afterscheduler.tick():Verification
pytest: 16/16 pass.researcherrunningclaudein~/→ reconciled toec2-userwithin one poll cycle, logged once, then stayed put (confirmed no repeat-rename spam).🤖 Generated with Claude Code