Skip to main content
Glama

launch_session

Start a Claude Code session in its own tmux window and block until it is ready, optionally in an isolated git worktree for parallel work.

Instructions

Start a new session: one full Claude Code process in its own tmux window.

Blocks until Claude shows its input box (up to ~90 s) so a failed start is reported here rather than discovered later. working_directory must be a Linux path (/mnt/c/... for a Windows folder). model overrides the profile's model (opus / sonnet). initial_message is delivered as the first task once the session is ready. provider is accepted for compatibility; only claude_code exists.

use_worktree runs the session in its own git worktree (under MAESTRO_HOME) on a new branch mx/<terminal_id> made from the repo's HEAD, so parallel workers on one repository never trample each other; the result's worktree gives its path and branch. The worker is told to commit there. Merge it yourself with plain git afterwards (git -C <repo> merge mx/<terminal_id>). Deleting the terminal removes the checkout after committing anything left uncommitted on the branch; the branch is kept when it has commits the repo's HEAD lacks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
providerNo
session_nameNo
use_worktreeNo
agent_profileYes
initial_messageNo
working_directoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does it well: discloses the ~90 s blocking wait and why (failures surface immediately), the worktree branch scheme mx/<terminal_id> from repo HEAD, the merge/cleanup semantics on terminal deletion, and that provider only supports claude_code. This is substantially more than the schema provides.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded in the first line, with parameter detail following in scannable sentences. The worktree paragraph is long but each sentence carries behavioral information (branch naming, merge instructions, deletion semantics), so it mostly earns its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return values needn't be described, and the description still explains the result's 'worktree' field. Behavior around blocking, cleanup, and branch retention is covered; agent_profile and session_name semantics remain undefined for a required parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does for most parameters (working_directory Linux path format, model values opus/sonnet, initial_message delivery timing, provider compatibility, use_worktree effect). Only session_name and agent_profile are left implicit, which is a minor gap given a 7-param tool at 0% coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource plus concrete elaboration ('one full Claude Code process in its own tmux window'), so the agent knows exactly what is created. It does not name or contrast with the sibling launch_sessions (batch variant), which is the one obvious ambiguity left.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real selection guidance: use_worktree for parallel workers on one repo, provider accepted for compatibility only. It lacks explicit when-not/alternative routing (e.g., 'use launch_sessions for multiple') but context is clear enough for correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.