Skip to main content
Glama
quolu
by quolu

claude_agent

Launch Claude Code agent in a persistent terminal, send initial prompts, and monitor completion asynchronously without blocking.

Instructions

【Claude Code (Anthropic)】の対話エージェント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を作らない。aiterm相関付きsession内の/login・/logoutは拒否する。起動して投げたら投げっぱなしでよい=親はここで待たない。完了通知は起動応答の wait_command(初回prompt時)または pty_send dispatch 後の aiterm-wait --session --cursor を親のターンを塞がない別プロセスとして起動して受ける(exit 0=done / 3=timeout(既定600秒・未完了) / 4=closed。receiptのoutcomeが正で、done以外は未完了。ポーリング不要・foreground実行はしない)。結果回収は pty_read(agent_transcript:true)。Claude の durable turn は claude_turn でも回収できる。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo作業ディレクトリ(対象リポのルート等・任意)
modelNo起動モデル(例: claude-sonnet-4-6)。省略時はClaude CLI既定
promptNo起動時に渡す初手プロンプト(任意)。送信後は待たずに即返る
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より前へ注入する

Output Schema

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

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

No annotations are provided, so the description carries the full burden. It discloses auth checks before session creation, injection of sub-agent self-awareness and delegation lineage, addition of launch-specific Stop hook settings, and the ownership model of aiterm. It also documents completion exit codes (0/3/4) and outcome semantics, going far beyond basic mutation traits.

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 information-dense; each sentence covers a distinct aspect (launch mode, config sharing, delegation, auth, completion handling, result retrieval). It is front-loaded with purpose, though a reader must parse a dense paragraph; slight structural organization could improve scannability, so 4.

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 the complexity (7 optional params, output schema, multiple sibling tools), the description is exceptionally complete: it covers preconditions, behavioral traits, completion signals, timeout semantics, and alternative retrieval methods. The output schema exists, so return-value details are not required.

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?

The input schema has 100% parameter coverage with clear descriptions (e.g., prompt states '送信後は待たずに即返る'), and the description adds minimal parameter-specific detail beyond referencing the wait_command tied to the launch response. Thus the baseline 3 is appropriate; the schema carries the parameter documentation burden.

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 with a specific verb+resource: 'Claude Code (Anthropic) の対話エージェントTUIを永続端末に起動する' (launch the Claude Code conversational agent TUI in a persistent terminal). It distinguishes itself from `claude -p` and from sibling agent tools by specifying Claude Code and the persistent-session model.

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?

Clearly explains the fire-and-forget pattern: '起動して投げたら投げっぱなしでよい=親はここで待たない' and advises not to poll or run in foreground. Provides explicit alternatives for completion notification (wait_command or aiterm-wait) and result retrieval (pty_read(agent_transcript:true) or claude_turn). Also gives when-not guidance by rejecting /login and /logout in correlated sessions.

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

Install Server

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/quolu/aiterm-mcp'

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