Skip to main content
Glama
kitepon
by kitepon

claude_agent

Launch Claude Code's interactive TUI in a persistent terminal and return immediately. Send subsequent commands via pty_send; the agent shares CLI settings, MCP plugins, and permissions.

Instructions

【旧互換alias。新規連携は agent_launch(harness=claude-code)】Claude Codeの対話エージェントTUIを永続端末に起動する。claude -pではなく、同じ利用者可視sessionへpty_sendで継続入力する。通常CLIと同じHOME・cwd・project/user/local設定・MCP・plugin・skill・permission/trustを共有する。aitermは完了相関stateだけをlaunch単位で所有する。起動されたagentにはsub-agent自己認識、親session、delegation depth/lineage、delegation_allowed=trueを注入し、必要な追加委譲は許可する。通常settingsへlaunch固有Stop hook settingsを加算する。起動前に共有認証を構造化確認し、未認証ならsessionを作らない。起動して投げたら投げっぱなしでよい=親はここで待たない。完了通知は起動応答またはpty_send dispatch receiptの wait_processを、親のターンを塞がない別プロセスAPIへexecutable/argsの境界を保ったまま渡して受ける(PowerShell 7のStart-Processはwindows_start_process_argument_listを使う)(exit 0=done / 3=timeout(既定600秒・未完了) / 4=closed。receiptのoutcomeが正で、done以外は未完了。ポーリング不要・foreground実行はしない)。wait_commandは人間向け互換表示。結果回収は pty_read(agent_transcript:true)。Claude の durable turn は claude_turn でも回収できる。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo作業ディレクトリ(対象リポのルート等・任意)
modelNo起動モデル(例: claude-sonnet-4-6)。省略時はClaude CLI既定
promptNo起動時に渡す初手プロンプト(任意)。送信後は待たずに即返る
env_varsNo起動したagentへ現在のMCP processから継承する環境変数名。値はtool引数へ渡さない
session_nameNoセッション名(省略で自動採番)
reasoning_effortNoClaude Code reasoning effort。low/medium/high/xhigh/max。省略時はCLI既定
launch_operation_idNopromptなしClaude launchのexact replay相関ID。session_name必須
throughline_source_sessionNo同一端末のThroughline sessionから所有権を変えずに記憶を読み、promptのmissionより前へ注入する
throughline_supplement_fileNoThroughline 0.10.8以降へそのまま渡すproject束縛済み長期記憶・知識の補足JSON path

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
harnessYes
providerYes
session_idYes
event_cursorYes
wait_commandYes
wait_processYes
submit_residueYes
managed_completionYes後方互換field。trueはaiterm完了相関が有効という意味で、project/user環境の隔離を意味しない
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral burden and does so thoroughly: fire-and-forget launch, shared HOME/cwd/settings/MCP/plugin/permissions, injected delegation metadata, Stop-hook additions, pre-launch auth verification, and exact exit codes 0/3/4 with the rule that only exit 0 means done. This is unusually complete operational disclosure.

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 description is long but dense; every sentence carries operationally relevant information and the alias/redirect note is front-loaded. Some parenthetical chains could be formatted more cleanly, but there is little redundancy for a tool with this level of behavioral complexity.

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

Completeness5/5

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

Given 9 parameters, no required parameters, and an output schema, the description still covers launch semantics, async handoff, completion receipts, auth preconditions, result collection, and sibling routing. With the output schema covering return structure, almost nothing an agent needs to invoke this correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented in the schema. The description adds general context such as cwd/HOME/settings inheritance but does not attach new meaning to individual parameters like throughline_source_session or launch_operation_id. Baseline 3 is appropriate given that the schema does the heavy lifting.

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

Purpose5/5

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

The description opens by identifying itself as an old-compatibility alias and redirects new integrations to agent_launch(harness=claude-code), then states it launches the Claude Code interactive-agent TUI on a persistent terminal. This is a specific verb+resource+scope framing that clearly distinguishes it from siblings and from claude -p.

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

Usage Guidelines5/5

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

It gives explicit when/when-not guidance: not claude -p, not a blocking wait, no polling, no foreground execution; continue input via pty_send, retrieve results via pty_read(agent_transcript:true) or claude_turn, and use agent_launch for new integrations. It also explains the async completion path and exit-code meanings.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kitepon/aiterm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server