Skip to main content
Glama
kitepon
by kitepon

codex_agent

Launch a persistent Codex interactive agent in a background terminal for coding, review, and research via conversation. Set model, reasoning effort, and write scope; get async completion.

Instructions

【旧互換alias。新規連携は agent_launch(harness=codex-cli)】Codexの対話エージェント TUI を永続端末に起動する。実装・レビュー・調査を対話で回す。通常CLIと同じHOME・cwd・project/user/local設定・MCP・plugin・skill・permission/trustを共有する。aitermは完了相関stateだけをlaunch単位で所有する。起動されたagentにはsub-agent自己認識、親session、delegation depth/lineage、delegation_allowed=trueを注入し、必要な追加委譲は許可する。委譲契約を使う完全な呼び出し例: codex_agent({"prompt":"<依頼>","model":"gpt-5.6-sol","reasoning_effort":"high","cwd":"/absolute/path/to/repo","write_scope":"read-only"})。turn は pty_send で送る(自動で非ブロック dispatch になる)。起動して投げたら投げっぱなしでよい=親はここで待たない。完了通知は起動応答または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)。model / reasoning_effort を引数で指定可(省略時は端末 config/CLI 既定を継承。実効値は起動応答に明示)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo作業ディレクトリ(対象リポのルート等・任意)
modelNo起動モデル(例: gpt-5.6-sol / gpt-5.6-terra / gpt-5.6-luna)。省略時は端末 config/CLI 既定を継承(端末側のピンがそのまま効く。実効値は起動応答に明示される)
promptNo起動時に渡す初手プロンプト(任意)。送信後は待たずに即返る
env_varsNo起動したagentへ現在のMCP processから継承する環境変数名。値はtool引数へ渡さない
write_scopeNo能力宣言。read-only、または書込みを許可するパスの説明文字列。対応harnessのread-onlyはCLI標準のread-only面で実効禁止する
session_nameNoセッション名(省略で自動採番)
reasoning_effortNoreasoning effort(思考レベル)。low/medium/high/xhigh/max/ultra(CLI/model 版依存)。ultra は max 推論+proactive 自動委譲 ON=使用量急増注意(明示要求時のみ)。省略時は端末 config/CLI 既定。
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
write_scopeNo
event_cursorYes
wait_commandYes
wait_processYes
submit_residueYes
managed_completionYes後方互換field。trueはaiterm完了相関が有効という意味で、project/user環境の隔離を意味しない
write_scope_enforcementNo
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

没有annotations,描述承担了全部行为披露责任。描述详尽展示了工具的行为模式:TUI启动方式、共享配置、注入的自我认知与委托权限、turn发送机制、完成通知的退出码(0/3/4)、结果获取路径、模型参数继承规则等。这些远超基本要求,没有任何隐藏行为。

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?

描述较长,但信息密度高,结构层次分明:先身份,再功能,然后共享配置、行为细节、调用示例、退出码、结果接收。开头即点明新老替代关系,有前置性。虽篇幅偏长,但对一个复杂交互式代理启动工具而言,每句都有实际价值。

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?

工具复杂度高(9参数、有输出schema),描述覆盖了启动、配置共享、委托链、退出码、结果获取、模型指定方式、调用示例,甚至包含了与pty_send/pty_read的交互模式。唯一未提的可能需要预先pty_open,但可通过兄弟工具推断。对于该工具,上下文已相当齐全。

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

Parameters4/5

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

Schema覆盖100%,每个参数都有基础描述。描述额外增加了重要语义:prompt发送后即返、write_scope的read-only实际强制方式、model/reasoning_effort的继承及实効値确认、throughline注入等。虽然描述没有逐个重复参数,但补充了关键行为细节,超越了schema基线。

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?

描述第一句即明确该工具是旧兼容alias,新集成应使用agent_launch,随后说明其核心功能是启动Codex对话代理TUI到持久终端,并用于实现、审查、调查。动词(起動)、资源(Codex TUI)和用途清晰,且与兄弟工具agent_launch的区分直接点明,不存在混淆。

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?

描述明确指出新規連携は agent_launch(harness=codex-cli),给出了当not-to-use的条件和替代方案。同时通过调用示例和说明其适用场景(実装・レビュー・調査),提供了何时使用的上下文。使用指南完整且无歧义。

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