Skip to content

Conversation

@yashas-salankimatt
Copy link
Contributor

@yashas-salankimatt yashas-salankimatt commented Feb 10, 2026

This is an extension of PR #112 - this one fixes the help text to show the correct key combo for sessions in tmux vs not. The preview text was still left as is in the older PR, which is incorrect.

Summary

  • Unset TMUX env var at startup so sidecar's internal tmux sessions can nest independently of the user's outer tmux session
  • Detect at init time whether sidecar was launched inside an existing tmux session, and show the correct detach key sequence in the hint text:
    • Inside tmux: Ctrl-b Ctrl-b d to detach (double prefix needed for nested session)
    • Outside tmux: Ctrl-b d to detach (single prefix suffices)
  • Prefix is dynamically resolved from the user's tmux config (e.g. Ctrl-a if remapped)

Test plan

  • [✓] Launch sidecar from inside an existing tmux session — verify hint shows double prefix (e.g. Ctrl-b Ctrl-b d to detach)
  • [✓] Launch sidecar outside tmux — verify hint shows single prefix (e.g. Ctrl-b d to detach)
  • [✓] Verify detach actually works with the shown key sequence in both cases
  • [✓] Test with a custom tmux prefix (e.g. C-a) to confirm it's picked up correctly

🤖 Generated with Claude Code

yashas-salankimatt and others added 2 commits February 10, 2026 02:45
When sidecar is started from within an existing tmux session, the user
needs to press the prefix key twice to detach from the nested session
(e.g. Ctrl-b Ctrl-b d). When started outside tmux, a single prefix
suffices. Detect TMUX env var at package init time (before main unsets
it) and adjust the hint text accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@marcus
Copy link
Owner

marcus commented Feb 11, 2026

Thanks @yashas-salankimatt! This one's in the review queue — we want to test it carefully since nested tmux is tricky territory. Will get to it soon. 🪶

@marcus marcus merged commit 13034e0 into marcus:main Feb 11, 2026
1 of 2 checks 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.

2 participants