Files
AgentHub/docs/claude-memory/never-tmux-kill-server.md
T
nntrivi2001 9c573f1e3c docs: snapshot of the project's Claude Code memory
Decisions, environment quirks and pitfalls learned while working on AgentHub
(docs/claude-memory/, indexed by MEMORY.md). Notes holding personal account
details are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:27:35 +07:00

1.4 KiB

name, description, metadata
name description metadata
never-tmux-kill-server Never run `tmux kill-server` (or any tmux kill) from this session — $TMUX overrides TMUX_TMPDIR and it kills the user's real server, including this session's pane
node_type type originSessionId modified
memory feedback 0ffc9ffc-1268-4f68-8d99-85f48962dfdb 2026-10-05T01:25:20.401Z

Never run tmux kill-server, even as env TMUX_TMPDIR=<tmp> tmux kill-server. This session runs inside tmux (TMUX=/tmp/tmux-1001/default,…), and tmux uses the $TMUX socket in preference to TMUX_TMPDIR. So that command killed the user's REAL default tmux server: every lane pane and the pane hosting this conversation. It happened twice on 2026-10-05 while cleaning up an isolated test server.

Why: It destroys the user's live agent sessions and stops this conversation; that is irreversible.

How to apply: To clean up a private test tmux server, either leave it alone (it dies with its temp dir/processes), or address its socket explicitly: env -u TMUX tmux -S <tmpdir>/tmux-<uid>/default kill-server, after checking with ls that the socket path is under the temp dir. npm run test:server already cleans up its own server; never add a manual kill. Kill test processes only by verified PID (check /proc/<pid>/environ). Never use pkill -f <pattern>: it also matches the shell running it. Related: agenthub-flaky-codex-ingest-tests.