Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Dec 14, 2025

Changes

libtmux 0.52.1 -> 0.53.0

Bug fix for session attaching

Bug fix for tmuxp load

User Experience

After running tmuxp load, users would see this traceback printed to their terminal after detaching:

Traceback (most recent call last):
  File "/home/d/.local/bin/tmuxp", line 7, in <module>
    sys.exit(cli.cli())
  ...
  File ".../tmuxp/cli/load.py", line 152, in _load_attached
    builder.session.attach()
  File ".../libtmux/session.py", line 332, in attach
    self.refresh()
  File ".../libtmux/neo.py", line 242, in fetch_obj
    raise exc.TmuxObjectDoesNotExist(...)
libtmux.exc.TmuxObjectDoesNotExist: Could not find object

Root Cause

The issue was caused by libtmux's Session.attach() calling refresh() after attach-session returned. Since attach-session is a blocking interactive command, the session state can change arbitrarily during attachment - including being killed entirely.

Timeline

  • Feb 2024: 9a5147aa - Session.attach() was added with the refresh() call
  • Nov 2025: tmuxp fdafdd2b switched from attach_session() to attach()
  • Users started experiencing the bug

Fix

The fix is in libtmux: tmux-python/libtmux#616

This PR adds a regression test to tmuxp to ensure the behavior is documented and tested.

@tony tony changed the title py(deps) Bump libtmux 0.52.1 -> 0.53.0a0 py(deps) Bump libtmux 0.52.1 -> 0.53.0 Dec 14, 2025
@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.97%. Comparing base (1a55e88) to head (240d85f).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1003   +/-   ##
=======================================
  Coverage   72.97%   72.97%           
=======================================
  Files          26       26           
  Lines        1839     1839           
  Branches      347      347           
=======================================
  Hits         1342     1342           
  Misses        394      394           
  Partials      103      103           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony tony marked this pull request as ready for review December 14, 2025 12:08
@tony tony merged commit cebe172 into master Dec 14, 2025
14 checks passed
@tony tony deleted the libtmux-v0.53.0 branch December 14, 2025 12:10
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