Skip to content

Commit c593bba

Browse files
committed
fix: remove automatic TUI launch from session hooks (#1066)
TUI companion auto-launch consumed excessive memory in multi-session (taskMaestro) environments. Remove the launch mechanism from session-start hook, cleanup from stop hook, and delete tui_launcher module and its tests. TUI source code (apps/mcp-server/src/tui/) is preserved for manual use.
1 parent 06d3447 commit c593bba

4 files changed

Lines changed: 0 additions & 680 deletions

File tree

packages/claude-code-plugin/hooks/lib/tui_launcher.py

Lines changed: 0 additions & 257 deletions
This file was deleted.

packages/claude-code-plugin/hooks/session-start.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -624,22 +624,6 @@ def main():
624624
except Exception:
625625
pass # Never block session start
626626

627-
# Step 7: Launch companion TUI (#970)
628-
try:
629-
_ensure_lib_path()
630-
from tui_launcher import launch as launch_tui
631-
from config import get_config as _get_tui_cfg
632-
633-
from session_utils import get_session_id as _get_sid_tui
634-
_tui_sid = _get_sid_tui()
635-
_tui_cwd = os.environ.get("CLAUDE_PROJECT_DIR", str(Path.cwd()))
636-
_tui_cfg = _get_tui_cfg(_tui_cwd)
637-
_tui_ok, _tui_msg = launch_tui(_tui_sid, _tui_cfg)
638-
if _tui_msg:
639-
print(_tui_msg, file=sys.stderr)
640-
except Exception:
641-
pass # Never block session start
642-
643627
sys.exit(0)
644628

645629
except PermissionError as e:

packages/claude-code-plugin/hooks/stop.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ def handle_stop(data: dict):
2828
from session_utils import get_session_id
2929
session_id = get_session_id()
3030

31-
# Clean up companion TUI pane (#970)
32-
try:
33-
from tui_launcher import cleanup as cleanup_tui
34-
cleanup_tui(session_id)
35-
except Exception:
36-
pass # Never block session stop
37-
3831
stats = SessionStats(session_id=session_id)
3932

4033
# Flush pending in-memory stats before finalize (#931)

0 commit comments

Comments
 (0)