← 返回
未分类 中文

Awesome Remote Control

Start a Claude Code remote control session in tmux with bypass permissions. Use when asked to start a remote session, start a Claude Code session, spin up Cl...
在 tmux 中以绕过权限的方式启动 Claude Code 远程控制会话。适用于被要求启动远程会话、Claude Code 会话或启动...
oobagi oobagi 来源
未分类 clawhub v1.0.8 1 版本 100000 Key: 无需
★ 0
Stars
📥 433
下载
💾 0
安装
1
版本
#latest

概述

Claude Code Remote Control

Starts a persistent Claude Code session in tmux with --dangerously-skip-permissions --remote-control. Auto-exits after 30 minutes of inactivity via CLAUDE_CODE_EXIT_AFTER_STOP_DELAY (Claude's native idle timer). Multiple concurrent sessions supported — each gets a unique animal name.

Starting a Session

Single session:

bash skills/claude-remote-control/scripts/start_session.sh <dir>

Multiple sessions in parallel (faster):

bash skills/claude-remote-control/scripts/start_sessions.sh <dir> <count>
# e.g. start_sessions.sh /path/to/project 3

Each session gets a friendly name like 🦊 Fox | my-project — used in tmux and the registry.

Important: After launching a session, always report the session URL (https://claude.ai/code/session_...) back to the user in your reply. The URL is printed in the script output — surface it so the user can open the remote control page immediately.

Stopping a Session

bash skills/claude-remote-control/scripts/stop_session.sh <session-label|tmux-name>
# e.g. stop_session.sh "🦊 Fox | my-project"
#      stop_session.sh cc-fox-my-project

The SessionEnd hook fires automatically, handling registry update.

Listing Sessions

bash skills/claude-remote-control/scripts/list_sessions.sh

Registry stored at ~/.local/share/claude-rc/sessions.json.

Attaching to a Session

tmux attach -t cc-fox-my-project   # use tmux name shown on start

Resuming a Session by UUID

When a session dies (killed or idle timeout), the registry entry is marked dead and the local UUID is captured at that moment. UUIDs persist for 30 days before being pruned.

Look up the UUID:

cat ~/.local/share/claude-rc/sessions.json

Resume using the start script with --resume :

bash skills/claude-remote-control/scripts/start_session.sh <dir> --resume <uuid>
# e.g. start_session.sh /path/to/project --resume abc123-def456

Or manually in a new tmux session:

tmux new-session -d -s "cc-fox-my-project" -c "/full/path/to/my-project"
tmux send-keys -t "cc-fox-my-project" 'claude -r "<uuid>" --dangerously-skip-permissions --remote-control --name "🦊 Fox | my-project"' Enter

This restores full conversation history. A new remote control URL is issued on reconnect.

How Idle Timeout Works

  1. CLAUDE_CODE_EXIT_AFTER_STOP_DELAY=1800000 (30m) is set as an env var when launching Claude in tmux.
  2. Claude's internal timer starts when it finishes responding and is idle at the prompt.
  3. After 30m idle, Claude auto-exits — triggering the SessionEnd hook.
  4. on_session_end.sh fires: marks the registry dead with UUID capture.

No background watcher process — everything is driven by Claude Code's native hooks.

Sending Tasks to Running Sessions

bash skills/claude-remote-control/scripts/send_task.sh <session-label|tmux-name> "<message>"
# e.g. send_task.sh "🦊 Fox | my-project" "Do an analysis of the codebase"
#      send_task.sh cc-fox-my-project "Fix the issues you identified"

The script:

  1. Resolves the tmux session name from a label or direct tmux name
  2. Verifies the session is alive
  3. Sends via tmux send-keys -l (literal mode — safe for special characters) + Enter

Tip: When sending follow-up tasks to a session that already has context (e.g., it just finished an analysis), do NOT re-paste the full spec or issue list. The agent already has that in its conversation. Just reference it — e.g., "fix the issues you identified". Re-sending bloats context and wastes tokens.

Notes

  • After launching, always report the session URL (https://claude.ai/code/session_...) to the user — this is the remote control link they need
  • --remote-control is undocumented but valid — activates remote control on startup
  • The session_0... URL is a cloud-side remote control ID — it cannot be used with claude -r. Only the local UUID from the registry works for resuming.
  • UUID is captured lazily when the session dies, not during startup — no background polling
  • Dead entries auto-prune after 30 days (runs at each startup)
  • The project dir formula: ~/.claude/projects/$(echo $WORKDIR | sed 's|/|-|g') (leading - is kept)
  • No background watcher — idle timeout and registry cleanup are handled entirely by Claude Code hooks
  • Workspace trust is pre-seeded in ~/.claude.json (under projects[].hasTrustDialogAccepted) so headless sessions skip the "do you trust this folder?" dialog

版本历史

共 1 个版本

  • v1.0.8 当前
    2026-05-03 08:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,380 📥 320,596
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,228 📥 267,967
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 676 📥 325,561