claude_code
Send prompts to an interactive Claude Code session running in a tmux terminal. Automatically starts sessions, preserves conversation history, and supports context clearing via /clear or /compact.
Instructions
Send a prompt to an interactive Claude Code session running in a tmux terminal.
Sessions and Claude Code are started automatically if not already running. The user can attach to the session at any time to watch Claude work: tmux attach -t {session-name}
SESSION NAMING: workFolder /Users/you/my-roblox-game → session: claude-my-roblox-game No workFolder → session: claude-code
BEHAVIOUR: • If the tmux session doesn't exist it is created automatically. • If Claude Code isn't running in the session it is started automatically. • Only one prompt at a time per session — concurrent calls return a busy error. • Conversation history is fully preserved between calls. • Claude Code has access to all configured MCP tools (Roblox Studio, Godot, Blender, etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The prompt to send to the Claude Code session. | |
| compact | No | Send /compact to the Claude Code session before delivering the prompt. Summarises conversation history via the Claude API, keeping key context while freeing up space. Use when context is growing but continuity still matters. Slower than clearContext (30–60s). If both are set, compact takes precedence. | |
| timeout | No | Max seconds to wait for a response (default: 300). | |
| workFolder | No | Absolute path to the project folder. Determines the tmux session name and sets the working directory when creating a new session. E.g. /Users/foo/my-project → session "claude-my-project". | |
| clearContext | No | Send /clear to the Claude Code session before delivering the prompt. Wipes conversation history entirely — use when starting a new major feature, a new work session, or when Claude Code warns about large context. Fast (< 1s). |