Skip to content

fix(agent-manager): detect agent at tmux pane PID#140

Open
codeaholicguy wants to merge 1 commit into
mainfrom
feature-agent-start-pane-pid
Open

fix(agent-manager): detect agent at tmux pane PID#140
codeaholicguy wants to merge 1 commit into
mainfrom
feature-agent-start-pane-pid

Conversation

@codeaholicguy

Copy link
Copy Markdown
Owner

Summary

  • evaluate the tmux pane PID with the same strict agent command matcher used for descendants
  • preserve BFS descendant traversal and deepest-match selection
  • add a regression test for agents that replace the pane shell

Root cause

TmuxManager.findAgentPid started its BFS at pane_pid but deliberately skipped command matching for that root node. When Claude or Codex replaces the tmux pane shell, the stable live agent is pane_pid and may have no matching descendant, so every managed-start poll returned null until the 15-second timeout killed the session.

Risk

Controlled and narrow: pane_pid is not accepted blindly. It must pass the existing per-agent strict command matcher, and the existing five stable PID polls remain unchanged. Descendant traversal and deepest-match behavior are preserved.

Regression proof

The new focused test expects a matching pane root PID. It failed before the fix with expected 100 / received null, passed with the fix, failed again when the old pane-root exclusion was temporarily restored, and passed again after restoring the fix.

Validation

  • focused TmuxManager suite: 15 passed
  • agent-manager suite: 480 passed
  • agent-manager typecheck: passed
  • agent-manager lint: passed
  • agent-manager build: passed
  • repository test suite: 901 passed
  • repository build across 6 projects: passed
  • commit hook repository lint: passed with pre-existing warnings only
  • git diff --check: 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