spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

fix: Use tmux -L default to ensure correct socket resolutionBrowse files
When Claude Code runs in a different context (container, namespace, etc),
tmux may resolve to a different socket than the user's terminal. Using
-L default explicitly targets the default socket name, fixing the issue
where Claude sees different tmux sessions than the user.
Claude authored on Dec 8, 2025 parent de49a07 · commit f799a477400f
2 changed files+5 -5compared with de49a07
Mplugins/plugin-dev/skills/plugin-settings/SKILL.md
Mplugins/plugin-dev/skills/plugin-settings/references/real-world-examples.md
@@ -230,8 +230,8 @@
230230 AGENT_NAME=$(echo "$FRONTMATTER" | grep '^agent_name:' | sed 's/agent_name: *//')
231231 COORDINATOR=$(echo "$FRONTMATTER" | grep '^coordinator_session:' | sed 's/coordinator_session: *//')
232232
233-# Send notification to coordinator
234-tmux send-keys -t "$COORDINATOR" "Agent $AGENT_NAME completed task" Enter
233+# Send notification to coordinator (use -L default to ensure correct socket)
234+tmux -L default send-keys -t "$COORDINATOR" "Agent $AGENT_NAME completed task" Enter
235235 ```
236236
237237 ### Pattern 3: Configuration-Driven Behavior
@@ -76,10 +76,10 @@
7676 # Send notification to coordinator
7777 NOTIFICATION="🤖 Agent ${AGENT_NAME} (Task ${TASK_NUMBER}, PR #${PR_NUMBER}) is idle."
7878
79-if tmux has-session -t "$COORDINATOR_SESSION" 2>/dev/null; then
80- tmux send-keys -t "$COORDINATOR_SESSION" "$NOTIFICATION" Enter
79+if tmux -L default has-session -t "$COORDINATOR_SESSION" 2>/dev/null; then
80+ tmux -L default send-keys -t "$COORDINATOR_SESSION" "$NOTIFICATION" Enter
8181 sleep 0.5
82- tmux send-keys -t "$COORDINATOR_SESSION" Enter
82+ tmux -L default send-keys -t "$COORDINATOR_SESSION" Enter
8383 fi
8484
8585 exit 0