Skip to content

fix: support Nix-managed tmux/git in find_tmux/find_git#137

Merged
shuntaka9576 merged 1 commit intomainfrom
fix/find-tmux-nix-path
Mar 27, 2026
Merged

fix: support Nix-managed tmux/git in find_tmux/find_git#137
shuntaka9576 merged 1 commit intomainfrom
fix/find-tmux-nix-path

Conversation

@shuntaka9576
Copy link
Copy Markdown
Owner

@shuntaka9576 shuntaka9576 commented Mar 27, 2026

Summary

  • find_tmux() and find_git() only checked Homebrew and system paths, so on Nix-managed Macs the binaries were never found
  • Sessions panel appeared empty because get_sessions() returned early with "tmux not found"
  • Added Nix Home Manager path, Nix single-user profile path, and a PATH-based fallback

Details

Root cause

On macOS with Nix (Home Manager), tmux is installed at /etc/profiles/per-user/<USER>/bin/tmux. This path was not in the candidate list, so find_tmux() returned None and list_tmux_panes_grouped() returned immediately without running tmux list-panes.

Diagnosis: ~/.local/share/agentoast/agentoast.log showed repeated get_sessions called entries with no tmux list-panes exit=... following them.

Fix

Extended find_tmux() and find_git() with a three-tier search:

  1. Hardcoded paths — Homebrew (Apple Silicon / Intel), system
  2. Nix paths/etc/profiles/per-user/$USER/bin/ (Home Manager) and /nix/var/nix/profiles/default/bin/ (single-user Nix). Constructed dynamically so they work even when the app is launched from Finder (no shell PATH).
  3. PATH fallback — scans $PATH entries; covers mise, asdf, and other custom installs when launched from a terminal.

On Nix-managed macOS systems, tmux is installed at
/etc/profiles/per-user/<USER>/bin/tmux (Home Manager) or
/nix/var/nix/profiles/default/bin/tmux (single-user Nix), neither of
which were checked by find_tmux(). This caused the Sessions panel to
appear empty because find_tmux() returned None and get_sessions()
returned early with "tmux not found".

Diagnosis: agentoast.log showed repeated "get_sessions called" entries
with no "tmux list-panes exit=..." following them.

Fix: extend find_tmux() and find_git() with:
1. Nix Home Manager path (/etc/profiles/per-user/$USER/bin/)
2. Nix single-user profile path (/nix/var/nix/profiles/default/bin/)
3. PATH-based fallback for mise, asdf, and other custom installs
@shuntaka9576 shuntaka9576 self-assigned this Mar 27, 2026
@shuntaka9576 shuntaka9576 marked this pull request as ready for review March 27, 2026 12:02
@shuntaka9576 shuntaka9576 merged commit 890cd52 into main Mar 27, 2026
1 check passed
@shuntaka9576 shuntaka9576 deleted the fix/find-tmux-nix-path branch March 27, 2026 12:02
@github-actions github-actions bot mentioned this pull request Mar 27, 2026
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