Verified facts
On this page
- Part 1. Verified Claude Code facts
- The transcript a Stop hook names (D-176), read 2026-11-28
- One real headless run, 2026-11-28
- Part 2. Verified facts: coding-agent CLIs (headless adapters + project MCP/config writers)
- How to read this file
- 1. OpenAI Codex CLI (
codex) - 2. Google Gemini CLI (
gemini) - 3. Google Antigravity CLI (
agy) - 4. Cursor CLI (
cursor-agent/agent) - 5. OpenCode (
opencode) - 6. GitHub Copilot CLI (
copilot) - Summary table
- Part 3. Verified platform facts
- Other tools, read 2026-11-25
- Other tools, read 2026-11-30
Checked on 2026-11-16, before any product code was written (brief B3). The brief's Appendix
was written from memory; this file is what the official sources said on that date. Where the
two disagree, Clara follows this file and the difference is logged in DECISIONS.md.
How the checking was done:
- Three research passes read official documentation, official repositories, the npm registry
(
npm view) and the GitHub API (gh api). Sources are named in every row. - Nothing was installed globally and no agent was run. The only agent CLI on the build machine
was Claude Code 2.1.326, whose
--helpoutput was read. Noclaude -pcall was made for this file. - A verdict of confirmed means an official source says so. changed means the brief was out of date. not found or unconfirmed means no official source states it; it is not a claim that the feature is missing. Clara treats those as unknown and labels the code that depends on them as experimental.
Contents:
- Claude Code: flags, stream shapes, permission bridge, plugins, skills, hooks.
- Other agent CLIs: Codex, Gemini, Antigravity, Cursor, OpenCode, Copilot.
- Platform: npm packages, MCP SDK, Node, GitHub Actions, GitHub API, Vercel, tooling.
Part 1. Verified Claude Code facts
Checked against the raw Markdown of the official docs at https://code.claude.com/docs/en/<page>.md and against help-only output of the local CLI, version 2.1.326. No model call was made, so nothing here was confirmed by running claude -p.
Row format: claim | verdict | what is true | source. Verdicts are confirmed, changed, or not found in docs. "Source" is a docs page name or "claude --help".
Docs page names have moved: there is no plugins.md, plugins-reference.md or plugin-marketplaces.md in the index. The plugin docs are now plugins/overview, plugins/create, plugins/components, plugins/manifest-reference, plugins/marketplace-reference, plugins/create-marketplace, plugins/cli-reference, plugins/install, plugins/loading, plugins/troubleshooting.
1. CLI flags and print mode
| claim | verdict | what is true | source |
|---|---|---|---|
--max-turns <n> is a documented flag |
confirmed | "Limit the number of agentic turns (print mode only). No limit by default." Example: claude -p --max-turns 3 "query". Not listed as its own option in claude --help on 2.1.326 |
cli-reference; claude --help |
--append-system-prompt-file <path> is a documented flag |
confirmed | "Load additional system prompt text from a file and append to the default prompt". Example: claude --append-system-prompt-file ./extra-rules.txt. Can be combined with --system-prompt / --system-prompt-file; from v2.1.283 a flag can be combined with its own file form (file contents come first). claude --help names it only inside the --bare text as --append-system-prompt[-file] |
cli-reference; claude --help |
--system-prompt-file is a documented flag |
confirmed | "Load system prompt from a file, replacing the default prompt". Example: claude --system-prompt-file ./custom-prompt.txt. claude --help names it only inside the --bare text as --system-prompt[-file] |
cli-reference; claude --help |
--permission-prompt-tool <tool> is a documented flag |
confirmed | "Specify an MCP tool to handle permission prompts in non-interactive mode. Pass the full name, such as mcp__<server>__<tool>, of a tool on an MCP server that the run loads." Claude Code waits for that server to connect before the first turn, up to MCP_TIMEOUT (30 seconds by default). Example: claude -p --mcp-config ./mcp.json --permission-prompt-tool mcp__permissions__approve "query". claude --help names it only inside the --permission-prompts <target> text |
cli-reference; claude --help |
The manual permission mode is called manual |
changed | The config value is default. manual is an alias for default (v2.1.200 or later) and is the label the UI and claude --help show. --permission-mode "Accepts default, acceptEdits, plan, auto, dontAsk, bypassPermissions, or manual as an alias for default." Hooks and the SDK always report "default", never "manual". claude --help choices: "acceptEdits", "auto", "bypassPermissions", "manual", "dontAsk", "plan" |
permission-modes; hooks; claude --help |
Default permission mode for -p runs |
confirmed | default (Manual). Table row: "claude -p or the Agent SDK | default". "In Claude Code v2.1.302 or later, claude -p and Agent SDK runs with no permission mode set start in Manual mode... Calls needing approval are denied unless you approve them with an allow rule, hook, canUseTool callback, or --permission-prompt-tool." The interactive terminal default is auto from v2.1.283 |
permission-modes |
--output-format stream-json requires --verbose with -p |
not found in docs | No page states the requirement as a rule. Every docs example pairs the two, for example claude -p "Explain recursion" --output-format stream-json --verbose --include-partial-messages, and the headless page says "Use --output-format stream-json with --verbose and --include-partial-messages". Only --prompt-suggestions and CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS say "Requires --print, --output-format stream-json, and --verbose". claude --help does not state it either. Safe practice: always pass --verbose |
headless; cli-reference; claude --help |
| (extra) There is a flag to stop permission prompts without a tool | confirmed | --permission-prompts host|none (v2.1.259 or later, default host); none denies anything that would prompt. Setting equivalent: permissions.denyInsteadOfPrompting |
cli-reference; claude --help |
(extra) --max-budget-usd <amount> exists |
confirmed | Listed in claude --help and the docs |
cli-reference; claude --help |
(extra) --bare behaviour |
confirmed | "--bare is the recommended mode for scripted and SDK calls, and will become the default for -p in a future release". Bare mode skips hooks, skills, plugins, MCP servers and CLAUDE.md auto-discovery, and never reads OAuth or keychain credentials, so it needs ANTHROPIC_API_KEY or apiKeyHelper. Hooks never run in bare mode, even from a --plugin-dir plugin |
headless |
Docs recipe for a CI run that never prompts:
claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"
2. stream-json and SDK message shapes
| claim | verdict | what is true | source |
|---|---|---|---|
First event is system with subtype: "init" |
confirmed | It is the first event unless plugin_install events or SessionStart / Setup hook_started, hook_progress, hook_response events come before it. Fields are in the type below. The headless page also documents mcp_server_errors on system/init (entries with name, type, message; key omitted when there are none) and plugin_errors |
agent-sdk/typescript; headless |
assistant messages carry text and tool_use blocks with name, input |
confirmed | Blocks are at message.message.content (a BetaMessage from the Anthropic SDK with id, content, model, stop_reason, usage). "Each assistant message carries one content block"; messages from one response share a message ID. Python types: TextBlock has text: str; ToolUseBlock has id: str, name: str, input: dict[str, Any] |
agent-sdk/typescript; agent-sdk/python |
user messages carry tool_result blocks |
confirmed | "UserMessage: emitted after each tool execution with the tool result content sent back to Claude." Python ToolResultBlock: tool_use_id: str, content: str | list[dict[str, Any]] | None, is_error: bool | None. "On a message that carries a tool_result block, tool_use_result is the tool's structured output object rather than the text sent to the model." |
agent-sdk/agent-loop; agent-sdk/typescript; agent-sdk/python |
| A raw NDJSON line example of an assistant or user message is shown | not found in docs | Only the TypeScript and Python types are documented; no literal stream line for these two message types | agent-sdk/typescript; headless |
Final result message has subtype, is_error, session_id, total_cost_usd, num_turns, duration_ms, usage, permission_denials |
confirmed | All of these are on every result arm. "All result subtypes carry total_cost_usd, usage, num_turns, and session_id". Also on every arm: uuid, duration_api_ms, stop_reason, modelUsage |
agent-sdk/typescript; agent-sdk/agent-loop |
Final result message always has a result string |
changed | result: string exists only on the success arm. Error arms carry errors: string[] instead and have no result field |
agent-sdk/typescript |
subtype values are success, error_max_turns, error_during_execution, error_max_budget_usd |
changed | There is a fifth value: error_max_structured_output_retries |
agent-sdk/typescript |
permission_denials entries |
confirmed | { tool_name: string; tool_use_id: string; tool_input: Record<string, unknown> }. Denials also appear in-stream as system / permission_denied messages (tool_name, tool_use_id, decision_reason_type, decision_reason, message), but those are not emitted when an MCP prompt tool is set; permission_denials on the result is authoritative |
agent-sdk/typescript; headless |
The result line is the last line of the stream |
confirmed | With the nuance that trailing system events such as prompt_suggestion can follow it |
headless |
(extra) usage vs modelUsage |
confirmed | usage covers the main loop only; modelUsage is per model for the whole tree (inputTokens, outputTokens, cacheReadInputTokens, cacheCreationInputTokens, webSearchRequests, costUSD, contextWindow, maxOutputTokens) |
agent-sdk/typescript; agent-sdk/cost-tracking |
(extra) terminal_reason |
confirmed | Optional; values include "completed", "max_turns", "budget_exhausted", "aborted_streaming", "aborted_tools", "hook_stopped", "model_error", "api_error" |
agent-sdk/typescript |
Type definitions as printed in the TypeScript reference:
type SDKSystemMessage = {
type: "system";
subtype: "init";
uuid: UUID;
session_id: string;
agents?: string[];
apiKeySource: ApiKeySource;
betas?: string[];
claude_code_version: string;
cwd: string;
tools: string[];
mcp_servers: {
name: string;
status: string;
source?: string;
}[];
model: string;
permissionMode: PermissionMode;
slash_commands: string[];
terminal_slash_commands?: string[];
output_style: string;
skills: string[];
plugins: { name: string; path: string }[];
plugin_errors?: {
plugin: string;
type: string;
message: string;
path?: string;
}[];
fast_mode_state?: FastModeState;
fast_mode_disabled_reason?: FastModeDisabledReason;
effort?: "low" | "medium" | "high" | "xhigh" | "max" | null;
capabilities?: string[];
};
type SDKAssistantMessage = {
type: "assistant";
uuid: UUID;
session_id: string;
message: BetaMessage; // From Anthropic SDK
parent_tool_use_id: string | null;
error?: SDKAssistantMessageError;
aborted?: true;
agent_id?: string;
timestamp?: string;
context_usage?: SDKContextUsage;
usage_report?: SDKUsageReport;
user_message_uuid?: string;
user_message_uuids?: string[];
resume_reason?: string;
supersedes?: UUID[];
};
type SDKUserMessage = {
type: "user";
uuid?: UUID;
session_id?: string;
agent_id?: string;
message: MessageParam; // From Anthropic SDK
pasted_content?: MessageParam["content"][];
parent_tool_use_id: string | null;
isSynthetic?: boolean;
shouldQuery?: boolean;
client_composed?: true;
tool_use_result?: unknown;
priority?: "now" | "next" | "later";
origin?: SDKMessageOrigin;
inline_pastes?: string[];
};
type SDKResultMessage =
| {
type: "result";
subtype: "success";
uuid: UUID;
session_id: string;
duration_ms: number;
duration_api_ms: number;
is_error: boolean;
api_error_status?: number | null;
num_turns: number;
result: string;
stop_reason: string | null;
ttft_ms?: number;
// ...other optional timing fields omitted here
total_cost_usd: number;
usage: NonNullableUsage;
modelUsage: { [modelName: string]: ModelUsage };
permission_denials: SDKPermissionDenial[];
queued_turn_count?: number;
structured_output?: unknown;
deferred_tool_use?: { id: string; name: string; input: Record<string, unknown> };
terminal_reason?: TerminalReason;
result_index?: number;
fast_mode_state?: FastModeState;
fast_mode_disabled_reason?: FastModeDisabledReason;
origin?: SDKMessageOrigin;
}
| {
type: "result";
subtype:
| "error_max_turns"
| "error_during_execution"
| "error_max_budget_usd"
| "error_max_structured_output_retries";
uuid: UUID;
session_id: string;
duration_ms: number;
duration_api_ms: number;
is_error: boolean;
num_turns: number;
stop_reason: string | null;
total_cost_usd: number;
usage: NonNullableUsage;
modelUsage: { [modelName: string]: ModelUsage };
permission_denials: SDKPermissionDenial[];
queued_turn_count?: number;
errors: string[];
startup_failure_reason?: SDKStartupFailureReason;
user_message_uuid?: string;
user_message_uuids?: string[];
resume_reason?: string;
terminal_reason?: TerminalReason;
result_index?: number;
fast_mode_state?: FastModeState;
fast_mode_disabled_reason?: FastModeDisabledReason;
origin?: SDKMessageOrigin;
};
type SDKPermissionDenial = {
tool_name: string;
tool_use_id: string;
tool_input: Record<string, unknown>;
};
Docs example for reading blocks:
if (block.type === "text") { block.text } else if (block.type === "tool_use") { block.name }
3. --permission-prompt-tool
| claim | verdict | what is true | source |
|---|---|---|---|
The tool is named in the form mcp__<server>__<tool> |
confirmed | "Pass the full name, such as mcp__<server>__<tool>". Example: mcp__permissions__approve. If it is not found: "Error: MCP tool mcp__permissions__approve (passed via --permission-prompt-tool) not found. Available MCP tools: none", exit code 1 on the first tool call |
cli-reference; errors |
The tool receives tool_name, input, tool_use_id |
not found in docs | No page gives the input schema the MCP tool receives. Only the SDK callback signature is documented: CanUseTool = (toolName: string, input: Record<string, unknown>, options: { signal, suggestions?, blockedPath?, mcpServer?, decisionReason?, defaultToNo?, suppressAlwaysAllowRule?, toolUseID, agentID?, requestId }). Treat the MCP tool's argument names as unverified until tested |
errors; agent-sdk/typescript |
The tool must return JSON text with behavior |
confirmed | "Return one text block whose text is {"behavior": "allow"} or {"behavior": "deny", "message": "<reason>"}." It must be a single text block: the error is "Permission prompt tool returned an invalid result. Expected a single text block param with type="text" and a string text value." Return no structuredContent (FastMCP from mcp.server: structured_output=False; fastmcp: output_schema=None and return a string; TypeScript SDK: no outputSchema) |
errors |
An allow result must include updatedInput |
changed | It is now optional. "To change the input, add updatedInput to the allow object. From v2.1.86 through v2.1.206, an allow needed "updatedInput": {} to keep the input." For inputs of about 40 KB or more, do not copy the input into updatedInput or a deny message |
errors |
| (extra) It can approve any tool | changed | It cannot approve an MCP tool marked requiresUserInteraction; an allow is converted to a deny (v2.1.199 or later) |
cli-reference |
| (extra) SDK option names | confirmed | permissionPromptToolName (TypeScript), permission_prompt_tool_name (Python) |
agent-sdk/typescript; agent-sdk/python |
| (extra) The tool may wait minutes for a person | confirmed | MCP_TOOL_TIMEOUT: "Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours)... Stdio and WebSocket servers have no per-request timer." CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT: a call with "no response and no progress notification for this long" aborts; the per-transport defaults are "300000 (5 minutes) for network servers and 1800000 (30 minutes) for stdio servers" (stdio exempt before v2.1.203). MCP_TIMEOUT is server startup, 30 seconds. So Clara's stdio server can hold a question for its ten minutes (D-107) |
env-vars |
Exact return text, as given in the docs:
{"behavior": "allow"}
{"behavior": "deny", "message": "<reason>"}
To change the input (shape from the docs' wording and the SDK PermissionResult type):
{"behavior": "allow", "updatedInput": { }}
SDK type the JSON mirrors:
type PermissionResult =
| { behavior: "allow"; updatedInput?: Record<string, unknown>; updatedPermissions?: PermissionUpdate[]; toolUseID?: string }
| { behavior: "deny"; message: string; interrupt?: boolean; toolUseID?: string };
4. Permission rule syntax
| claim | verdict | what is true | source |
|---|---|---|---|
Bash(git diff *) allows commands starting with git diff, and the space before * matters |
confirmed | "The trailing * enables prefix matching, so Bash(git diff *) allows any command starting with git diff. The space before * is important: without it, Bash(git diff*) would also match git diff-index." A trailing * also matches the bare command (Bash(ls *) matches ls, not lsof). Bash(ls:*) is the equivalent older suffix form. * can appear anywhere and matches any text including spaces. Bash(*) equals Bash |
permissions |
Edit(src/**) scopes edits to a path |
confirmed | Read/Edit patterns use gitignore syntax. path or ./path is relative to the current directory. As an allow rule Edit(src/**) matches only <cwd>/src; as a deny or ask rule it matches a src directory at any depth. Edit(**/src/**) matches any depth. * stays within one segment, ** crosses directories |
permissions |
Read(//abs/**) is an absolute path |
confirmed | //path is absolute from the filesystem root, for example Read(//Users/alice/secrets/**). ~/path is the home directory |
permissions |
Edit(/docs/**) is an absolute path |
changed | A single leading / is relative to the settings source, not the filesystem root: "edits in <primary working directory>/docs/, not /docs/". In user settings /path resolves under ~/.claude/; for CLI flags and session rules it resolves under the primary working directory |
permissions |
Write(path) rules work like Edit(path) rules |
changed | "Edit rules apply to all built-in tools that edit files." "Write(path), Glob(path), and Grep(path) rules don't match": "use Edit(docs/**) in place of Write(docs/**)" (same for NotebookEdit). Use Read(...) in place of Grep(...) or Glob(...). A bare Write with no path still matches every use. A Read deny rule also blocks Edit and Write on the same path (the Write check from v2.1.228) |
permissions |
MCP tool rules are mcp__<server>__<tool> |
confirmed | mcp__<server>__<tool> for one tool, mcp__<server>__* or mcp__<server> for all tools of a server. Allow rules for MCP tools take no parenthesised specifier. Characters such as . or spaces in a server name become _. Plugin servers use mcp__plugin_<plugin-name>_<server-name>__*, for example mcp__plugin_my-plugin_database-tools__*. Tool-name globs in allow rules only after a literal mcp__<server>__ prefix (mcp__github__get_*); unanchored allow globs such as "*" or "mcp__*" are skipped; deny and ask rules accept "mcp__*" |
permissions; mcp |
| Deny beats allow | confirmed | "Rules are evaluated in order: deny, then ask, then allow. The first match in that order determines the outcome, and rule specificity doesn't change the order." "An allow rule can't carve an exception out of a deny rule." Deny rules apply in every mode, including bypassPermissions |
permissions |
--allowedTools uses the same rule syntax |
confirmed | Example: --allowedTools "Bash(git diff *),Bash(git log *),Bash(git status *),Bash(git commit *)" |
headless |
5. Signals and exit codes for claude -p
| claim | verdict | what is true | source |
|---|---|---|---|
| Exit code 0 on success, non-zero on failure | confirmed | "Claude Code exits with code 0 on success and a non-zero code when the run fails". Failures inside the run (for example missing auth) are printed as the result on stdout; invalid flags go to stderr before the run starts | headless |
| SIGTERM exits with 143 | confirmed | "Claude Code exits with code 143. Claude Code leaves the turn that was in progress unfinished and records no result for it. To end the turn instead, send SIGINT, or call the Agent SDK's interrupt(), before you stop the process." On SIGTERM it kills the process tree of running Bash commands, runs SessionEnd hooks, then exits |
headless |
| SIGINT exit code (for example 130) | not found in docs | The docs say only that SIGINT ends the turn; no exit code is given | headless |
| Specific exit code for max turns reached | not found in docs | Only "nonzero": an error result such as Reached maximum number of turns means "The underlying Claude Code process also exits with a nonzero code." Result subtype is error_max_turns |
agent-sdk/agent-loop |
| Specific exit code for budget exceeded | not found in docs | Same as above; result subtype is error_max_budget_usd. No number given |
agent-sdk/agent-loop; agent-sdk/typescript |
| (extra) Exit code 1 cases | confirmed | Documented for specific startup errors: invalid --json-schema, invalid --agents, unparseable ~/.claude.json, permission prompt tool not found, deleted working directory |
errors |
6. Skills
| claim | verdict | what is true | source |
|---|---|---|---|
Project skills live at .claude/skills/<skill-name>/SKILL.md |
confirmed | Also nested <subdir>/.claude/skills/... and --add-dir directories. .claude/commands/*.md is the older format and still works |
skills |
User skills live at ~/.claude/skills/<skill-name>/SKILL.md |
confirmed | Called "Personal". There is also an Enterprise location in the managed settings directory | skills |
The description limit is 1,536 characters |
changed | The cap is on the combined text: "the combined description and when_to_use text is truncated at 1,536 characters in the skill listing". The whole listing has a budget of 1% of the context window (skillListingBudgetFraction, SLASH_COMMAND_TOOL_CHAR_BUDGET) |
skills |
Keep SKILL.md under 500 lines |
confirmed | "Keep SKILL.md under 500 lines. Move detailed reference material to separate files." It is a tip, not an enforced limit |
skills |
$ARGUMENTS is replaced with the arguments |
confirmed | Also $ARGUMENTS[N] (0-based), $N ($0 is the first), $name (with the arguments field), ${CLAUDE_SESSION_ID}, ${CLAUDE_EFFORT}, ${CLAUDE_SKILL_DIR}, ${CLAUDE_PROJECT_DIR}, and in plugin skills ${CLAUDE_PLUGIN_ROOT}, ${CLAUDE_PLUGIN_DATA}. If no placeholder is present, Claude Code appends ARGUMENTS: <your input> |
skills |
Plugin skills are namespaced as /plugin-name:skill-name |
confirmed | my-plugin/skills/review/SKILL.md gives /my-plugin:review; name: fancy in front matter gives /my-plugin:fancy. The bare /fancy also works unless another command uses that name. In -p mode: "Include /skill-name in the prompt string and Claude Code expands it before running." |
skills; plugins/create-marketplace |
| Front matter fields are required | changed | All fields are optional; only description is recommended. Unknown fields are ignored silently |
skills |
Front matter fields (source: skills):
| field | meaning |
|---|---|
name |
Command name; defaults to the directory name |
description |
What the skill does and when to use it; falls back to the first non-empty line of the body |
when_to_use |
Extra trigger context, appended to the description in the listing |
argument-hint |
Hint shown in autocomplete for expected arguments |
arguments |
Named positional arguments, used as $name in the body |
disable-model-invocation |
Default false; true means only the user can run it with /name |
user-invocable |
Default true; false hides it from the / menu |
allowed-tools |
Tools pre-approved while the skill is active; space- or comma-separated string, or a YAML list |
disallowed-tools |
Tools removed while the skill is active |
model |
Model for the rest of the turn; inherit allowed |
effort |
low, medium, high, xhigh, max |
context |
fork runs the skill in a forked subagent |
agent |
Subagent type to use with context: fork |
background |
With context: fork; default true |
hooks |
Hooks scoped to the skill's lifetime |
paths |
Glob patterns that limit automatic activation |
shell |
bash (default) or powershell for inline shell blocks |
metadata |
Free-form map |
license |
License string |
compatibility |
String up to 500 characters; not acted on |
Outside Claude Code (claude.ai uploads, Skills API) only name, description, license, compatibility, metadata, allowed-tools are allowed.
7. Plugins
| claim | verdict | what is true | source |
|---|---|---|---|
.claude-plugin/plugin.json is required |
changed | "The manifest is optional." When present it sits at .claude-plugin/plugin.json; everything else goes at the plugin root, not inside .claude-plugin/ |
plugins/manifest-reference |
name is required; version, description, author are optional |
confirmed | "name is the only required key." Name rules: non-empty, no spaces, @, : or path separators; kebab-case; names starting with claude-, anthropic-, anthropics-, cc-plugin- are a validate error. author is an object (name required; email, url optional). Setting version pins users to that version until it changes |
plugins/manifest-reference |
| Other optional manifest keys | confirmed | $schema, displayName, homepage, repository, license, keywords, metadata, icon, documentationUrl, supportUrl, privacyPolicyUrl, termsOfServiceUrl, defaultEnabled, dependencies, userConfig, types, channels, skills (adds to the default skills/), commands (replaces the default), agents (replaces the default), hooks (merged with hooks/hooks.json), mcpServers (merged with .mcp.json), lspServers, outputStyles, workflows, experimental. Unknown top-level keys are stripped (validate warning). Component paths must be relative and start with ./ |
plugins/manifest-reference |
Default component folders are skills/, commands/, agents/, hooks/hooks.json, .mcp.json |
confirmed | Full list: Skills skills/; Commands commands/; Agents agents/; Hooks hooks/hooks.json; MCP servers .mcp.json; LSP servers .lsp.json; Output styles output-styles/; Workflows workflows/; Themes themes/; Monitors monitors/monitors.json; Executables bin/. A CLAUDE.md at the plugin root is not loaded |
plugins/manifest-reference |
${CLAUDE_PLUGIN_ROOT} is the plugin's install path |
confirmed | "Absolute path of the plugin's installed version"; it changes on update, so do not store state there. ${CLAUDE_PLUGIN_DATA} (~/.claude/plugins/data/<id>/) persists across updates. Resolved in hook command / args, MCP stdio command / args / env, and skill, command and agent Markdown bodies; exported as env vars to hook and MCP stdio processes; not present in Bash-tool commands. Quote it in shell-form hook commands: "command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/format.sh\"" |
plugins/manifest-reference; plugins/components |
A marketplace needs name, owner, plugins |
confirmed | "name, owner, and plugins are required." owner.name is required (email, url optional). claude plugin validate warns when description is missing. Each plugin entry needs name and source |
plugins/marketplace-reference |
A plugin in a subfolder of the same repo uses a relative source such as "./plugin" |
confirmed | A relative path string "resolved from the marketplace root" (the directory that contains .claude-plugin/). "Must start with ./". "." or "./" means the root itself. A path containing .. fails validation. Relative sources resolve only when the marketplace was added as github, git, file or directory; not when added by a direct url to marketplace.json. Bare names need metadata.pluginRoot (v2.1.239 or later) |
plugins/marketplace-reference; plugins/create-marketplace |
| Entry name and manifest name can differ | changed | Allowed but it breaks things: the entry name is the install id, the manifest name is the skill prefix. "Keep the two names the same." |
plugins/create-marketplace |
/plugin marketplace add owner/repo adds a GitHub marketplace |
confirmed | owner/repo, optionally owner/repo#ref. In a session it adds and reports the result. A local path must start with ./ or ../ because a bare name/name is read as a GitHub repository |
plugins/install; plugins/cli-reference |
/plugin install name@marketplace installs the plugin |
changed | In a session it "doesn't install right away: it opens the /plugin panel on that plugin's details so you can review it and choose a scope first". /plugin is not available in claude -p |
plugins/install; plugins/cli-reference |
| Non-interactive equivalents exist | confirmed | claude plugin marketplace add <source> [--scope user|project|local] [--sparse <paths...>] [--json] and claude plugin install <plugin>@<marketplace> [-s, --scope user|project|local] [--json]. Default scope is user for both. One step: claude plugin install <plugin> --marketplace <source> (v2.1.292 or later). Exit codes 0 success, 1 failure. Also claude plugin list, details, enable, disable, uninstall, update |
plugins/cli-reference; claude plugin --help |
claude plugin validate checks a plugin |
confirmed | claude plugin validate <path> [--strict] [--json]. Given a directory it validates .claude-plugin/marketplace.json if present, otherwise .claude-plugin/plugin.json, otherwise the component files. Exit 0: Validation passed or Validation passed with warnings; exit 1: Validation failed; exit 2: unexpected error. --strict treats warnings as errors. The local help also lists --profile <name> (choices: "directory"). It checks plugin .mcp.json from v2.1.281. From a marketplace directory it does not open the listed plugins' skill, hook or MCP files, so validate each plugin directory too |
plugins/cli-reference; claude plugin validate --help |
| (extra) Test a plugin without installing | confirmed | claude --plugin-dir ./my-plugin (repeatable; directory or .zip), or --plugin-url <url> |
plugins/cli-reference; claude --help |
Marketplace file from the docs walkthrough (my-marketplace/.claude-plugin/marketplace.json):
{
"name": "my-marketplace",
"description": "Plugins for my team",
"owner": {
"name": "Your Name"
},
"plugins": [
{
"name": "my-first-plugin",
"source": "./plugins/my-first-plugin",
"description": "A greeting plugin to learn the basics"
}
]
}
Shell sequence from the same walkthrough:
claude plugin validate ./my-marketplace
claude plugin marketplace add ./my-marketplace
claude plugin install my-first-plugin@my-marketplace
claude plugin list
8. Hooks for plugins
| claim | verdict | what is true | source |
|---|---|---|---|
Plugin hooks go in hooks/hooks.json under a top-level "hooks" key |
confirmed | "Save the plugin's hooks in hooks/hooks.json at the plugin root, under a top-level "hooks" key, in the same shape as the hooks object in settings.json." A file with only the event map and no wrapper fails to load. An inline hooks object in plugin.json is the event map itself, with no wrapper |
plugins/components; plugins/manifest-reference |
SessionStart matcher values are startup, resume, clear, compact |
changed | There is a fifth: fork. startup = new session; resume = --resume, --continue or /resume; clear = /clear; compact = auto or manual compaction; fork = a session forked from an existing one. Omitting matcher (or "*" / "") matches all. Several values: startup|resume |
hooks |
Stdin JSON has session_id, cwd, source, hook_event_name |
confirmed | Plus transcript_path, and optionally model, agent_type, session_title. Common optional fields: prompt_id (absent until the first user input), scratchpad_dir. source is "startup", "resume", "clear", "compact" or "fork". On resume / fork with a prior response: seconds_since_last_response, context_tokens, prompt_cache_likely_expired, estimated_cache_write_usd (v2.1.251 or later) |
hooks |
| Plain stdout becomes context | confirmed | "A hook that only adds context can print it without building JSON, because Claude Code adds a SessionStart hook's plain-text stdout to Claude's context." Applies on exit code 0. Stdout counts as JSON only when it is exactly one JSON object with nothing else around it | hooks |
{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":"..."}} adds context |
confirmed | Exact shape confirmed. The string is wrapped in a system reminder at the start of the conversation, before the first prompt. Over 10,000 characters it is written to a file and Claude gets the path plus a preview of the first 2,000 characters. Other SessionStart fields: initialUserMessage (used with -p), sessionTitle, watchPaths, reloadSkills |
hooks |
timeout field exists and its unit is seconds |
confirmed | "timeout | no | Seconds before canceling." It is a field on each hook handler object. Default 600 for command, http and mcp_tool hooks, 30 for prompt, 60 for agent |
hooks |
| Any hook type works on SessionStart | changed | "Only type: "command" and type: "mcp_tool" hooks are supported." |
hooks |
(extra) CLAUDE_ENV_FILE, read 2026-11-27 |
confirmed | "SessionStart hooks have access to the CLAUDE_ENV_FILE environment variable, which provides a file path where you can persist environment variables for the shell commands Claude runs later in the session." Also on Setup, CwdChanged and FileChanged; not in a hook run by PowerShell. Write export lines and append (>>) to keep other hooks' lines; each Bash command runs the file before itself. PowerShell commands get only plain assignments |
hooks |
| (extra) When plugin hooks run | confirmed | Registered when a session loads the plugin; they fire on their events from then on. In an interactive session SessionStart hooks run in the background, but Claude's first response waits for them. Hooks do not run in --bare mode |
plugins/components; hooks; headless |
Plugin hooks/hooks.json with a SessionStart hook, as printed in the docs (no matcher, so it fires for every source):
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\""
}
]
}
]
}
}
SessionStart with a matcher, as printed in the hooks guide (settings form; the event map is the same in hooks/hooks.json):
{
"hooks": {
"SessionStart": [
{
"matcher": "compact",
"hooks": [
{
"type": "command",
"command": "echo 'Reminder: use Bun, not npm. Run bun test before committing. Current sprint: auth refactor.'"
}
]
}
]
}
}
Combined form for a plugin. This exact file is not printed in the docs; it is assembled from the two examples above plus the documented timeout field, and has not been run:
{
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume|clear|compact",
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.sh\"",
"timeout": 10
}
]
}
]
}
}
SessionStart stdin example from the docs (a resumed session):
{
"session_id": "abc123",
"transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
"cwd": "/Users/...",
"hook_event_name": "SessionStart",
"source": "resume",
"model": "claude-opus-5",
"seconds_since_last_response": 5400,
"context_tokens": 182340,
"prompt_cache_likely_expired": true,
"estimated_cache_write_usd": 1.1396
}
SessionStart JSON output example from the docs:
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "Current branch: feat/auth-refactor\nUncommitted changes: src/auth.ts, src/login.tsx\nActive issue: #4211 Migrate to OAuth2",
"sessionTitle": "auth-refactor"
}
}
9. MCP config
| claim | verdict | what is true | source |
|---|---|---|---|
A project .mcp.json has a top-level mcpServers map |
confirmed | Lives at the project root. A stdio entry has command, optional args, optional env. An entry with no type is read as stdio; "type": "stdio" is also accepted. Remote entries need "type": "http", "sse" or "ws" plus url |
mcp; agent-sdk/mcp |
${VAR} and ${VAR:-default} expand in .mcp.json |
confirmed | In a server's command, args, env, url or headers. An unset variable with no default leaves the literal ${VAR} text and a warning in claude mcp list. A variable set to an empty string counts as set. In a remote server's url and headers, credential names such as ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN always read as empty. In project .mcp.json, CLAUDE_PROJECT_DIR needs a default: ${CLAUDE_PROJECT_DIR:-.} |
mcp |
--mcp-config accepts a file path or a JSON string |
confirmed | "Load MCP servers from JSON files or strings (space-separated)". Example: claude --mcp-config ./mcp.json. The headless page writes it as --mcp-config <file-or-json>. Invalid entries are skipped, not fatal, and are reported in mcp_server_errors on system/init. --strict-mcp-config loads only what --mcp-config passes |
cli-reference; headless; claude --help |
The file passed to --mcp-config uses the mcpServers wrapper |
not found in docs | No page prints the contents of a file passed to --mcp-config. The .mcp.json shape with mcpServers is the only documented server-file shape |
cli-reference; mcp |
claude mcp add --scope project writes .mcp.json |
confirmed | claude mcp add --transport http shared-server --scope project https://example.com/mcp. Stdio form: claude mcp add [options] <name> -- <command> [args...]. -s, --scope <scope>: local, user or project, default local. -e, --env KEY=value; -t, --transport (stdio, sse, http; defaults to stdio). Also claude mcp add-json <name> '<json>' with the object inside mcpServers, not the wrapper |
mcp; claude mcp add --help |
| Project servers need approval | changed | Only in interactive sessions. "In claude -p runs ... Claude Code can't show that prompt: it loads project-scoped servers without asking." |
mcp |
A plugin .mcp.json uses the mcpServers wrapper |
confirmed | Both forms load. Declare it "in the same shape as a project .mcp.json"; "You can also omit the mcpServers wrapper and put db at the top level of the file." The server registers as plugin:<plugin-name>:<server-name> and its tools as mcp__plugin_<plugin-name>_<server-name>__<tool-name> |
plugins/components; mcp |
Stdio entry in a project .mcp.json, from the docs:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
}
}
}
Stdio entry with type and env, from the docs' add-json example:
{"type":"stdio","command":"/path/to/weather-cli","args":["--api-key","abc123"],"env":{"CACHE_DIR":"/tmp"}}
Variable expansion example from the docs:
{
"mcpServers": {
"api-server": {
"type": "http",
"url": "${API_BASE_URL:-https://api.example.com}/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}
Plugin .mcp.json at the plugin root, from the docs:
{
"mcpServers": {
"database-tools": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/db-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": {
"DB_URL": "${DB_URL}"
}
}
}
}
10. CI authentication
| claim | verdict | what is true | source |
|---|---|---|---|
claude setup-token creates a long-lived token for CI |
confirmed | "generate a one-year OAuth token with claude setup-token". It opens the browser flow, prints the token to the terminal, and does not save it. Requires a Claude subscription (Pro, Max, Ultra, Team, Enterprise) |
authentication; cli-reference; claude setup-token --help |
CLAUDE_CODE_OAUTH_TOKEN is the env var for that token |
confirmed | export CLAUDE_CODE_OAUTH_TOKEN=your-token. Ignored when set in project and local settings files. Takes precedence over keychain credentials. The token carries only the user:inference scope |
authentication; env-vars; agent-sdk/typescript |
ANTHROPIC_API_KEY works for CI |
confirmed | Sent as the X-Api-Key header. "In non-interactive mode (-p), the key is always used when present." It outranks CLAUDE_CODE_OAUTH_TOKEN in the precedence order (cloud provider, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, apiKeyHelper, CLAUDE_CODE_OAUTH_TOKEN, profiles, /login) |
authentication; env-vars |
The OAuth token works with --bare |
changed | "Bare mode does not read CLAUDE_CODE_OAUTH_TOKEN. If your script passes --bare, authenticate with ANTHROPIC_API_KEY or an apiKeyHelper instead." |
authentication; headless |
| GitHub Actions secret names | confirmed | ANTHROPIC_API_KEY passed as anthropic_api_key, or CLAUDE_CODE_OAUTH_TOKEN passed as claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}. For a secret shared across repositories the docs recommend an API key, since the OAuth token is tied to one person's subscription |
github-actions |
11. Model aliases for --model
| claim | verdict | what is true | source |
|---|---|---|---|
--model accepts aliases sonnet, opus, haiku |
confirmed | Aliases: default (clears the override; "Not itself a model alias"), best (same model as opus), fable, sonnet, opus, haiku, sonnet[1m], opus[1m], opusplan (opus in plan mode, sonnet for execution). A full model name also works, for example claude-opus-5-5 or claude-fable-5-2 |
model-config; cli-reference |
claude --help lists the aliases |
confirmed | "Use an alias for the latest model (e.g. 'fable', 'opus', or 'sonnet') or a model's full name." | claude --help |
| What the aliases resolve to | confirmed | On the Anthropic API: opus = Opus 5.5, sonnet = Sonnet 5.5, haiku = Haiku 5.5; fable = Fable 5.2 (Fable 5 in Claude apps gateway sessions). Other providers resolve to earlier versions. Pin with the full name or ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_FABLE_MODEL |
model-config |
Summary of items marked "changed" or "not found in docs"
Changed:
- Docs page names: plugin reference pages now live under
plugins/. - Manual mode: config value is
default;manualis an alias and theclaude --helplabel. - Result message:
resultonly onsuccess; error arms haveerrors: string[]; fifth subtypeerror_max_structured_output_retries. - Permission prompt tool:
updatedInputon allow is optional; cannot approverequiresUserInteractionMCP tools. Edit(/docs/**)is relative to the settings source, not the filesystem root.Write(path)rules do not match; useEdit(path).- Skills: 1,536 characters is the cap on
descriptionpluswhen_to_usecombined; no front matter field is required. - Plugin manifest is optional;
nameis the only required key when it exists. - Marketplace entry name and manifest name should be kept the same.
/plugin install name@marketplacein a session opens the details panel instead of installing directly;/pluginis unavailable inclaude -p.- SessionStart: fifth matcher /
sourcevaluefork; onlycommandandmcp_toolhook types. - Project
.mcp.jsonservers load without approval inclaude -p. --baredoes not readCLAUDE_CODE_OAUTH_TOKEN.
Not found in docs:
- A stated rule that
--output-format stream-jsonrequires--verbosewith-p(examples always pair them). - The input payload the
--permission-prompt-toolMCP tool receives. - Raw NDJSON line examples of
assistantanduserstream messages. - The SIGINT exit code.
- Specific exit code numbers for max turns and budget exceeded (only "nonzero").
- The contents of a file passed to
--mcp-config.
The transcript a Stop hook names (D-176), read 2026-11-28
Checked against Claude Code 2.1.332's hook documentation and the keys (not the text) of a transcript this machine wrote.
| Fact | Status | Detail |
|---|---|---|
The Stop hook's stdin carries transcript_path and hook_event_name: "Stop" |
confirmed | transcript_path is common to every hook's input, as are session_id and cwd |
The transcript is JSON Lines, named <session id>.jsonl |
confirmed | Under ~/.claude/projects/<folder>/; clara chat-hook reads it only when the name is the chat's own session id |
An assistant line has message.id, message.model and message.usage |
confirmed | usage holds input_tokens, output_tokens, cache_read_input_tokens and cache_creation_input_tokens, among others |
One message is written as several lines with the same message.id |
confirmed | One line per part of the message (text, each tool call); the usage on each is the message's, so Clara counts the last line of each id once |
A <synthetic> model line carries a usage of noughts |
confirmed | Counted for nothing |
| Subagents' messages | partly | In the transcript seen, a subagent's lines were in the same file with their own model; a newer Claude Code may keep them in files of their own, which Clara does not read, so a chat's tokens can be short of the true count, never over it |
| A turn's cost in money | not given | Claude Code reports no cost for an interactive chat; Clara reports tokens only |
One real headless run, 2026-11-28
clara start ADD-1 --headless --model haiku on a scratch repository, with CLARA_HOME in a
scratch folder and the real Claude Code 2.1.332 signed in. The ticket: add() subtracted, and
the board's one check was node add.test.js.
| Fact | Status | Detail |
|---|---|---|
The adapter's flags start claude -p and its stream reads to the end |
confirmed | The run printed each tool call as it came: ToolSearch, clara_claim, clara_context, a Bash read, an Edit, a Bash commit, clara_checkpoint |
| The agent reaches Clara's tools through the run's own MCP config | confirmed | It claimed the ticket as agent:claude, read its context and handed it in with a summary |
The commit lands on the ticket's branch in a worktree under CLARA_HOME |
confirmed | clara/ADD-1-fix-add-so-it-adds, one commit; the base branch was not touched |
| The checks run on the last commit and move the ticket to review | confirmed | test passed in 0.3 s; the ticket went to in_review |
| Usage is reported | confirmed | 8 turns, 187,339 input tokens (with the cache), 1,673 output, $0.0064; 39 s in all |
| The trust guard | confirmed | The first start was refused until clara trust --yes, as designed |
| What it showed to fix | fixed | --headless --dry-run printed a chat's command instead of refusing; the run warned that the adapter was untested, which this run ends |
Part 2. Verified facts: coding-agent CLIs (headless adapters + project MCP/config writers)
Researched 2026-11-16 from official docs and official GitHub repos only. Nothing was installed or executed locally; no CLI behaviour was tested.
How to read this file
- "unconfirmed" means I could not find it stated in an official source. It is not a claim that the feature is absent.
- Evidence quality differs by tool. Treat exact strings accordingly:
- OpenCode, GitHub Copilot CLI, Codex rules syntax: read from raw markdown / JSON schema / source. Flag names and field names are exact.
- Codex (everything else), Gemini CLI, Antigravity, Cursor: read through a summarizing fetch tool. Flag names and structure are reliable; treat wording of quoted sentences as close paraphrase, and re-check any field name you hard-code against the cited URL.
- Event shapes marked "source-derived" come from repo source code, not a documented contract, and can change without notice.
1. OpenAI Codex CLI (codex)
Sources: learn.chatgpt.com/docs/non-interactive-mode, /docs/developer-commands?surface=cli, /docs/extend/mcp?surface=cli, /docs/config-file/config-basic, /docs/agent-configuration/agents-md, /docs/agent-configuration/rules, /docs/build-skills, /docs/auth; github.com/openai/codex (codex-rs/exec/src/exec_events.rs). Note: developers.openai.com/codex/* now 308-redirects to learn.chatgpt.com/docs/*.
1. Non-interactive invocation
codex exec "<prompt>"(aliascodex e).- Prompt via stdin: omit the prompt or pass
-(cat prompt.txt | codex exec -). If stdin is piped AND a prompt arg is given, the arg is the instruction and stdin is added as context. - Working directory:
--cd <path>/-C <path>. - Requires a Git repo unless
--skip-git-repo-check. - Progress goes to stderr; the final message goes to stdout.
- Other exec flags:
-o/--output-last-message <path>,--output-schema <path>,--ephemeral,--ignore-user-config,--ignore-rules,--trust,--add-dir.
2. Machine-readable output
--json(alias--experimental-json) emits JSONL on stdout.- Event types:
thread.started(thread_id),turn.started,turn.completed(usage),turn.failed(error),item.started/item.updated/item.completed(item),error(message). itemhasid,typeand flattened details. Item types:agent_message(text) — assistant textreasoning(text)command_execution(command,aggregated_output,exit_code,status:in_progress|completed|failed|declined)file_change(changes[{path, kind: add|delete|update}],status)mcp_tool_call(server,tool,arguments,result,error,status)collab_tool_call,web_search(id,query,action),todo_list(items[{text, completed}]),error(message)
- Session id:
thread_idonthread.started. - Usage (on
turn.completed):input_tokens,cached_input_tokens,cache_write_input_tokens,output_tokens,reasoning_output_tokens. No cost field. - Final result: the last
item.completedwithtype: "agent_message"; there is no separate result event.-o <path>writes the last message to a file. - Example from the docs:
{"type":"thread.started","thread_id":"0199a213-81c0-7800-8aa1-bbab2a035a53"}
{"type":"turn.started"}
{"type":"item.started","item":{"id":"item_1","type":"command_execution","command":"bash -lc ls","status":"in_progress"}}
{"type":"item.completed","item":{"id":"item_3","type":"agent_message","text":"Repo contains docs, sdk, and examples directories."}}
{"type":"turn.completed","usage":{"input_tokens":24763,"cached_input_tokens":24448,"output_tokens":122,"reasoning_output_tokens":0}}
3. Resume
codex exec resume <SESSION_ID> [PROMPT];codex exec resume --last [PROMPT];--last --allto search across directories.SESSION_IDis the UUID fromthread_id, or a session name.
4. Permissions / sandbox
--sandbox/-sread-only | workspace-write | danger-full-access(exec default:read-only).--dangerously-bypass-approvals-and-sandbox(alias--yolo).--approve-for-me(alias--not-so-yolo): auto-review plus workspace-write; conflicts with--sandboxand--yolo.--full-autois no longer supported. Docs say to use--sandbox workspace-writeor--approve-for-meinstead.--ask-for-approval/-a(on-request | never) is documented as a global flag, not in theexectable. Whetherexechonours it: unconfirmed.- Shell allow-listing: yes, via Starlark-style
.rulesfiles (docs label rules "experimental"):
prefix_rule(
pattern = ["gh", "pr", "view"],
decision = "allow", # allow | prompt | forbidden (default "allow")
justification = "optional reason",
match = ["gh pr view 7888"], # optional load-time self-tests
not_match = [],
)
- Locations:
rules/next to each active config layer — user~/.codex/rules/*.rules(e.g.default.rules); project<repo>/.codex/rules/(loaded only when the project.codex/layer is trusted). patternelements are literals or a list of alternatives. Most restrictive match wins:forbidden > prompt > allow.bash -lc "a && b"is split into individual commands when the script is a plain chain.--ignore-rulesskips them.- MCP tools: per-server
enabled_tools,disabled_tools,default_tools_approval_mode.
5. Model / limits
--model/-m;-c key=valueconfig overrides;--profile/-p.- Turn or budget limit flag: unconfirmed (none found in the exec docs).
6. MCP config
- User:
~/.codex/config.toml. - Project:
.codex/config.toml— supported, but for trusted projects only. Precedence: CLI flags > project.codex/config.toml(closest wins) > profile > user > cloud-managed >/etc/codex/config.toml> defaults. - Format (TOML, table name
mcp_servers):
[mcp_servers.some-server]
command = "npx"
args = ["-y", "some-package", "mcp"]
[mcp_servers.some-server.env]
MY_ENV_VAR = "value"
- stdio keys:
command(required),args,env,env_vars,cwd,startup_timeout_sec(10),tool_timeout_sec(60),enabled,required,enabled_tools,disabled_tools. HTTP:url,bearer_token_env_var,http_headers,env_http_headers. - CLI:
codex mcp add <name> [--env K=V] -- <command...>writes user config. Project scope via the CLI: unconfirmed.
7. Instructions / skills
AGENTS.override.mdthenAGENTS.md: global in~/.codex(CODEX_HOME), then from project root down to cwd, one file per directory, concatenated. Limit 32 KiB (project_doc_max_bytes); extra names viaproject_doc_fallback_filenames.- Skills: yes.
SKILL.mdwith requirednameanddescription. Project:.agents/skills(cwd up to repo root). User:$HOME/.agents/skills. Admin:/etc/codex/skills..codex/skillsis not mentioned in the Codex docs.
8. CI auth
CODEX_API_KEYset inline for a single invocation:CODEX_API_KEY=<key> codex exec --json "..."(works withcodex exec,codex review, the TS SDK).printenv OPENAI_API_KEY | codex login --with-api-key.- Enterprise:
CODEX_ACCESS_TOKEN+codex login --with-access-token. - Docs warn against job-level
OPENAI_API_KEY/CODEX_API_KEYand recommend the Codex GitHub Action.
9. Status: actively maintained. Docs relocated to learn.chatgpt.com.
2. Google Gemini CLI (gemini)
Sources: github.com/google-gemini/gemini-cli (README, docs/cli/headless.md, docs/cli/cli-reference.md, docs/tools/mcp-server.md, docs/cli/skills.md, docs/cli/gemini-md.md, docs/reference/configuration.md, docs/reference/policy-engine.md, packages/core/src/output/types.ts); geminicli.com/docs/get-started/authentication/; developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/.
1. Non-interactive invocation
gemini -p "<prompt>"(--prompt). Headless mode is also triggered in a non-TTY.- Piped stdin text is appended to the
-pprompt. - Working-directory flag: unconfirmed (none documented; run from the target cwd).
--include-directoriesadds directories. --skip-trusttrusts the workspace for the session.
2. Machine-readable output
--output-format/-otext | json | stream-json.json: one object{session_id?, response?, stats?, error?, warnings?}.stream-json(JSONL) event types:init(session_id,model)message(role:user|assistant,content,delta?)tool_use(tool_name,tool_id,parameters)tool_result(tool_id,status:success|error,output?,error?{type,message})error(severity:warning|error,message)result(status:success|error,error?,stats?{total_tokens, input_tokens, output_tokens, cached, input, duration_ms, tool_calls, models})
- No cost field. Base fields shared by every event (e.g. a timestamp): unconfirmed.
- Exit codes: 0, 1, 42 (input error), 53 (turn limit exceeded).
- Doc example lines: none captured (unconfirmed whether the docs include one).
3. Resume
--resume/-rwith"latest", an index, or a session ID (gemini -r "abc123" "query");--list-sessions;--delete-session.- Combining
--resume <id>with-pspecifically: unconfirmed.
4. Permissions / sandbox
--approval-mode default | auto_edit | yolo | plan.--yolo/-yis deprecated in favour of--approval-mode=yolo.--sandbox/-s; envGEMINI_SANDBOX(true|false|docker|podman|<custom>).- Shell allow-listing: yes, two mechanisms.
- Settings:
tools.allowed, e.g."run_shell_command(git)"; alsotools.core,tools.exclude. (--allowed-toolsflag is deprecated in favour of the Policy Engine.) - Policy Engine TOML at
~/.gemini/policies/*.toml:[[rule]]withtoolName,commandPrefix,commandRegex,decision(allow|deny|ask_user),priority,modes.
- Settings:
- Two traps for headless use: the workspace
.gemini/policiestier is documented as currently non-functional, and in non-interactive modeask_useris treated asdeny. --admin-policy;--allowed-mcp-server-names.
5. Model / limits
--model/-m(auto,pro,flash,flash-lite, or a full model name); envGEMINI_MODEL.- Turn limit: no flag. Setting
model.maxSessionTurns(default-1).
6. MCP config
- Project:
.gemini/settings.json. User:~/.gemini/settings.json.
{ "mcpServers": { "some-server": { "command": "npx", "args": ["-y", "some-package", "mcp"] } } }
- Properties:
command|url(SSE) |httpUrl,args,env,cwd,timeout(default 600000 ms),trust,includeTools,excludeTools,headers,description. Avoid underscores in server names. - CLI:
gemini mcp add [options] <name> <commandOrUrl> [args...],-s/--scope user|project(defaultproject),-t/--transport stdio|sse|http.
7. Instructions / skills
GEMINI.md(global~/.gemini/GEMINI.md; workspace directories and parents; loaded just-in-time on tool access).AGENTS.mdis not read by default. Opt in withcontext.fileName, e.g.["AGENTS.md", "CONTEXT.md", "GEMINI.md"].- Skills: yes. Workspace
.gemini/skills/or the.agents/skills/alias (.agentswins within a tier). User~/.gemini/skills/or~/.agents/skills/.
8. CI auth
GEMINI_API_KEY.- Vertex AI:
GOOGLE_API_KEYwithGOOGLE_GENAI_USE_VERTEXAI=true, orGOOGLE_CLOUD_PROJECT+GOOGLE_CLOUD_LOCATION+GOOGLE_APPLICATION_CREDENTIALS. .gemini/.envis loaded (first one found, not merged).
9. Status, and the "replaced by Antigravity" claim
The claim is confirmed, with a narrower scope and a more precise date than "some users in June 2026". Three official sources:
- README banner: free individual access and Google AI Pro / Ultra (Google One) "moved to Antigravity CLI on June 18, 2026"; the repo is now "maintained for enterprise Gemini Code Assist workflows on Google Cloud" and is "not tuned for the Gemini 4 series".
- Auth docs: for the unpaid tier and Google One users, Gemini CLI "was replaced by Antigravity CLI on June 18th, 2026".
- Google Developers Blog (2026-05-19): on June 18, 2026 Gemini CLI stops serving requests for Google AI Pro/Ultra and free individual users; Gemini Code Assist Standard/Enterprise is unchanged; Gemini CLI "will remain accessible via paid Gemini and Gemini Enterprise Agent Platform API keys".
Practical reading: gemini still works with a paid API key or enterprise Code Assist, and the repo still ships weekly releases. It does not work for free-tier or Google One OAuth users, who are directed to agy.
3. Google Antigravity CLI (agy)
Sources: antigravity.google/docs/cli/headless, /docs/cli/reference, /docs/cli/gcli-migration, /docs/cli/conversations, /docs/mcp, /docs/permissions, /docs/skills, /docs/rules, /docs/settings?tab=cli, /docs/install; github.com/google-antigravity/antigravity-cli.
1. Non-interactive invocation
agy -p "<prompt>"(aliases--print,--prompt). Response to stdout; errors, progress and permission notices to stderr.- Plain-text prompt via stdin: unconfirmed (only
--input-format stream-jsonon stdin is documented). - Working-directory flag: unconfirmed (none documented;
--add-dirand--projectexist; theinitevent reportscwd). --print-timeout <duration>(default0s);--disable-slash-commands.
2. Machine-readable output
--output-format text | json | stream-json.jsonenvelope:conversation_id,status(SUCCESS|ERROR|CANCELED|INTERRUPTED|INVALID|WAITING|RUNNING),response,error,duration_seconds,num_turns,structured_output,json_schema,usage{input_tokens, output_tokens, thinking_tokens, cache_read_tokens, total_tokens}.stream-jsonis NDJSON keyed byevent(nottype):init(cwd,tools,permission_mode:request-review|always-proceed,model,agent)step_update— payload nested under.step_update:conversation_id,step_index,state(ACTIVE|DONE),step_type(user_input|agent_response|tool|checkpoint),tool_name,text_delta,duration_seconds,usage,tool_info{name, parameters, output, error},subagent_inforesult— payload nested under.result, same shape as thejsonenvelope
- No cost field.
- jq examples from the docs (no raw sample lines captured):
jq -j 'select(.event=="step_update") | .step_update.text_delta // empty'
jq 'select(.event=="result") | .result.usage'
--json-schemafor structured output.--input-format stream-jsonrequires--output-format stream-json; user event is{"event":"user","message":{"content":...}}; do not pass-pwith it.- Whether
-p --output-format stream-jsonworks without stream-json input: unconfirmed (one non-official search snippet claimed the two must be paired; the official page only states the reverse requirement).
3. Resume
--conversation <id>(id fromconversation_id);-c/--continuefor the most recent.
4. Permissions / sandbox
--dangerously-skip-permissions(equalsalways-proceed);--sandbox;--mode accept-edits | auto | plan.- In headless mode, tools that need approval are soft-denied: the run continues and exits 0 with a stderr notice. An adapter cannot rely on exit code to detect a blocked tool.
- Shell allow-listing: yes, in
~/.gemini/antigravity-cli/settings.json:
"permissions": {
"allow": ["command(git status)", "read_url(github.com)"],
"ask": ["command(git push)"],
"deny": ["write_file(.env)"]
}
- Syntax
action(target):command(git),command(regex:npm run (build|lint|test)),write_file(src/),mcp(linter/*),command(*). Deny > Ask > Allow. - Related settings:
toolPermission(request-review|proceed-in-sandbox|strict|always-proceed),agentMode,enableTerminalSandbox. - Project-level
settings.json/ project-level permission rules: unconfirmed (none documented).
5. Model / limits
--model <slug>(list withagy models);--effort low|medium|high|xhigh|max;--agent.- Max-turns or budget flag: unconfirmed (none found; only
--print-timeout).
6. MCP config
- Project:
<workspace>/.agents/mcp_config.json. User:~/.gemini/config/mcp_config.json.
{ "mcpServers": { "some-server": { "command": "npx", "args": ["-y", "some-package", "mcp"] } } }
- Properties:
command|serverUrl(Streamable HTTP only —url/httpUrlare not supported, unlike Gemini CLI),args,env,cwd,headers,disabled,enabledTools,disabledTools,timeoutSeconds,authProviderType,oauth. - An
agy mcp addcommand: unconfirmed (none documented; edit files or use the/mcpoverlay).
7. Instructions / skills
AGENTS.mdorGEMINI.mdat each level from workspace up to repo root; also.agents/AGENTS.md/.agents/GEMINI.md..agents/rules/*.md(frontmatter with requiredtrigger; legacy.agent/rules).- Global:
~/.gemini/AGENTS.md,~/.gemini/GEMINI.md,~/.gemini/config/rules/*.md. - Skills:
<workspace-root>/.agents/skills/<skill>/SKILL.md(legacy.agent/skills). Frontmatterdescriptionrequired,nameoptional. Global:~/.gemini/config/skills/,~/.gemini/antigravity-cli/skills/,~/.gemini/skills/. A workspace.gemini/skills/must be renamed to.agents/skills/.
8. CI auth
GEMINI_API_KEYworks only together with"modelProvider": "gemini"in~/.gemini/antigravity-cli/settings.json. Setting the env var alone has no effect.GOOGLE_API_KEYand.envfiles are not read.- Or ADC:
gcloud auth application-default login --project <GCP_PROJECT>plusAGY_ADC_AUTH=true(optionalGOOGLE_CLOUD_QUOTA_PROJECT,GOOGLE_CLOUD_LOCATION). - Otherwise cached keyring OAuth. An unauthenticated non-TTY run exits with "authentication required".
- Service-account key /
GOOGLE_APPLICATION_CREDENTIALSsupport: unconfirmed.
9. Status: launched 2026-05-19. Install: curl -fsSL https://antigravity.google/cli/install.sh | bash. The GitHub repo is public but appears to hold README/CHANGELOG/issues only; whether the source is published is unconfirmed. agy plugin import gemini migrates Gemini CLI extensions.
4. Cursor CLI (cursor-agent / agent)
Sources: cursor.com/docs/cli/headless, /docs/cli/reference/output-format, /docs/cli/reference/parameters, /docs/cli/reference/permissions, /docs/cli/reference/authentication, /docs/cli/installation, /docs/cli/mcp, /docs/context/mcp, /docs/context/rules, /docs/context/skills, cursor.com/changelog/cli-jan-08-2026, /docs/cli/changelog.
Binary name: docs now use agent everywhere. Changelog 2026-01-08: the agent command is the primary entrypoint and cursor-agent "remains as a backward-compatible alias". No removal notice found through v2026.10.22.
1. Non-interactive invocation
agent -p "<prompt>"(--print), prompt as positional arg.- Prompt via stdin: unconfirmed (changelog only says
-pno longer blocks on an open stdin pipe). - Working directory:
--workspace <path>;--add-dir <path>. --trust: trust the workspace without prompting (headless only).
2. Machine-readable output
--output-format text | json | stream-json(only with--print);--stream-partial-output.jsonresult:{type:"result", subtype:"success", is_error:false, duration_ms, duration_api_ms, result, session_id, request_id?}. On failure: non-zero exit, message on stderr, no JSON.stream-jsonevents:system/ subtypeinit(apiKeySource:env|flag|login,cwd,session_id,model,permissionMode)user(message{role, content[]},session_id)assistant(message{role:"assistant", content:[{type:"text", text}]},session_id). With partial output:timestamp_ms,model_call_id; only events withtimestamp_msand nomodel_call_idcarry new text.tool_callsubtypestarted/completed(call_id,session_id,tool_callkeyed by kind, e.g.readToolCall/writeToolCallwithargsandresult.success, orfunction{name, arguments})result(same shape asjson)
- Token usage: the output-format page documents none. Changelog (Feb 2026) mentions per-turn input/output/cache token totals and a
request_idinstream-json; exact field names: unconfirmed. Cost field: unconfirmed (none documented). - Doc example lines: not captured verbatim.
3. Resume
--resume [chatId];--continue(alias for--resume=-1);agent resume,agent ls,agent create-chat.- Use together with
-p: unconfirmed (not explicitly documented).
4. Permissions / sandbox
-f/--force(alias--yolo);--sandbox enabled|disabled;--mode plan|ask;--approve-mcps.- Without
--force, print mode edits workspace files and runs allow-listed/sandboxed commands, rejecting the rest. - Shell allow-listing: yes. Global
~/.cursor/cli-config.json; project<project>/.cursor/cli.json:
{ "permissions": { "allow": ["Shell(npm)", "Read(**/*.md)"], "deny": ["Write(**/*.key)"] } }
- Tokens:
Shell(commandBase)(alsocmd:args, e.g.curl:*),Read(glob),Write(glob),WebFetch(domain),Mcp(server:tool). Deny wins.
5. Model / limits
--model <model>;agent models/--list-models.- Turn or budget limit flag: unconfirmed (none documented).
6. MCP config
- Project:
.cursor/mcp.json. User:~/.cursor/mcp.json(the CLI shares the editor's config).
{ "mcpServers": { "some-server": { "command": "npx", "args": ["-y", "some-package", "mcp"], "env": {} } } }
- The field table lists
type: "stdio"as required, but the docs' own examples omit it. Whether omittingtypeis safe: unconfirmed — writing"type": "stdio"is the conservative choice. - Also
envFile; interpolation${env:NAME},${workspaceFolder},${userHome}. agent mcp list | list-tools | login | enable | disable. Noaddsubcommand found.
7. Instructions / skills
.cursor/rules/*.mdc(frontmatterdescription,globs,alwaysApply; plain.mdfiles there are ignored);AGENTS.mdat root and nested..cursorrulesis not mentioned in current docs.- Whether the CLI (as opposed to the editor) loads rules: implied by shared config, not stated explicitly — unconfirmed.
- Skills: project
.agents/skills/,.cursor/skills/(compat:.claude/skills/,.codex/skills/); user~/.agents/skills/,~/.cursor/skills/. Frontmattername(must match folder) anddescriptionrequired.
8. CI auth: CURSOR_API_KEY or --api-key. NO_OPEN_BROWSER=1 suppresses browser launch.
9. Status: actively maintained; latest changelog entry v2026.10.22.
5. OpenCode (opencode)
Sources (read raw, exact): opencode.ai/docs/*.md, opencode.ai/config.json (schema), github.com/anomalyco/opencode branch dev (packages/cli/src/commands/commands.ts, packages/cli/src/run/run.ts, run/noninteractive.ts). github.com/sst/opencode redirects to anomalyco/opencode.
Breaking change to know first: OpenCode 2.x is current (v2.3.0, 2026-11-13) and moved config to a V2 shape. The V1 shape is still accepted but marked deprecated in the schema. Install: npm install --global @opencode/cli.
1. Non-interactive invocation
opencode run "<message>"(variadic args joined by spaces).- Stdin: with no arg, stdin is the message; with an arg, piped stdin is appended as extra context (source).
- Working directory: no
--dirflag onrun; it usesprocess.env.PWD ?? process.cwd()(source). Set both the child's cwd andPWD. - Flags:
--continue/-c,--session/-s <id>,--fork,--worktree/-w [name],--model/-m,--agent,--format default|json,--file/-f,--title,--archived,--thinking,--auto; global--standalone,--server <url>. - Docs say CI should use
--standalone.
2. Machine-readable output
--format jsonemits NDJSON. Shapes are source-derived (dev branch); the docs give no event reference or example.- Every line:
{type, timestamp, sessionID, ...}.step_start(part{id, sessionID, messageID, type:"step-start", snapshot})step_finish(part{..., type:"step-finish", reason, snapshot, cost, tokens}) — token usage and cost live heretext(part{id, sessionID, messageID, type:"text", text, time{start,end}}) — assistant textreasoning(only with--thinking)tool_use(part{partID, sessionID, messageID, type:"tool", id, tool, state{status:"completed"|"error", input, output|error, title, metadata, time}})error(error{type, message}; exit code 1)retry(messageID, attempt, nextRetryAt, error)background_wait(jobs[{id, kind, title}])
- No dedicated final "result" event: the result is the accumulated
textparts, and the run ends at process exit. - Inner field layout of
tokens: unconfirmed (not expanded in what I read).
3. Resume
opencode run --session ses_4f2a1c "..."("Session ID to continue, or to create if it does not exist");--continue.- List:
opencode session list --max-count 20 --format json.
4. Permissions / sandbox
--auto: auto-approve permissions that are not explicitly denied (hidden aliases--yolo,--dangerously-skip-permissions).- Without
--auto,runauto-rejects permission requests (source). - Shell allow-listing: yes. V2 ordered rules, last match wins, default
ask:
{ "permissions": [
{ "action": "shell", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "git status *", "effect": "allow" },
{ "action": "shell", "resource": "git push *", "effect": "deny" }
] }
- Actions:
read,edit,glob,grep,shell,subagent,skill,question,webfetch,websearch,external_directory, and<server>_<tool>for MCP.policiesfor hard denies. - V1
permission: { bash: {...} }is still accepted. - OS-level sandbox flag: unconfirmed (none found).
5. Model / limits
--model provider/model#variant; config keymodel.- Turn limit: no CLI flag; per-agent
stepsin config (formerlymaxSteps).
6. MCP config
- Project:
opencode.json/opencode.jsonc, or.opencode/opencode.json(c). User:~/.config/opencode/opencode.json(c). - V2 format — note the
serverslevel and the array-valuedcommand:
{
"$schema": "https://opencode.ai/config.json",
"mcp": { "servers": { "some-server": { "type": "local", "command": ["npx", "-y", "some-package", "mcp"] } } }
}
- Local keys:
type(required,"local"),command(required, array),cwd,environment(notenv),disabled(notenabled),codemode,timeout{startup, catalog, execution},protocol,pool. - Docs: "V2 does not place server names directly under
mcp". The V1 form (mcp.<name>withenabledand numerictimeout) is still accepted but deprecated. - CLI:
opencode mcp add <name> [--env K=V] [--global] -- <command...>(writes project config by default);--url,--header.
7. Instructions / skills
AGENTS.mdonly (global~/.config/opencode/AGENTS.md; workspace directory upward). Docs: V2 "recognizesAGENTS.mdonly. It does not useCLAUDE.mdas a fallback." Extra files via the configinstructionsarray.- Skills: project
.opencode/skills/<id>/SKILL.md(compat.claude/skills,.agents/skills); global~/.config/opencode/skills(compat~/.claude/skills,~/.agents/skills).
8. CI auth
- Provider env var on the process, e.g.
ANTHROPIC_API_KEY=... opencode run --standalone "..."; oropencode service set env ANTHROPIC_API_KEY ...;{env:VAR}substitution in config. - Other env vars seen:
OPENCODE_DISABLE_PROJECT_CONFIG,OPENCODE_CLI_CONFIG_CONTENT,OPENCODE_LOG_LEVEL,OPENCODE_PASSWORD,OPENCODE_DB. - Whether V1
OPENCODE_CONFIG/OPENCODE_CONFIG_CONTENT/OPENCODE_PERMISSIONstill work in V2: unconfirmed.
9. Status: very active (repo pushed within the last day; v2.3.0 released 2026-11-13; MIT; default branch dev).
6. GitHub Copilot CLI (copilot)
Sources (read raw, exact): docs.github.com/en/copilot/reference/cli-command-reference, /en/copilot/reference/copilot-cli-reference/cli-programmatic-reference, /en/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically, /en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers, /en/copilot/how-tos/copilot-cli/customize-copilot/create-skills, /en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli; github.com/github/copilot-cli (releases).
1. Non-interactive invocation
copilot -p "<prompt>"(--prompt). Exits after completion, non-zero if interrupted.- Stdin:
echo "..." | copilot. Piped input is ignored if-pis also given. - Working directory:
-C DIRECTORY("Change working directory before doing anything else"). - Useful:
-s/--silent(response only, no usage stats),--no-ask-user,--no-auto-update,--add-dir=PATH,--attachment PATH. - Env:
COPILOT_TASK_WAIT_TIMEOUT_SECONDS(default 600) caps how long-pwaits for background agents/commands before exiting.
2. Machine-readable output
--output-format=json→ JSONL, one JSON object per line (textis the default).- Event shapes for a
-prun: unconfirmed. The docs state only "JSONL: one JSON object per line"; no type names, no fields for assistant text, tool calls, session id, usage or cost, and no example. The only record documented is for the separatecopilot workflow runcommand: final recordtype: "workflow.result"withdata.name,data.run.runId,data.run.status(completed|halted|paused|cancelled|error),data.run.result. Do not assume a-prun emits that shape. - Without
--output-format json, the exit summary includes acopilot --resume=SESSION-IDhint. - Alternatives for a transcript:
--share=PATH(Markdown; default./copilot-session-<ID>.md),--share-gist.
3. Resume
--resume=SESSION-ID(also accepts an ID prefix or session name);--continue(most recent session in cwd, falling back to the globally most recent).- Explicitly documented for headless: bare
--resumeneeds a TTY picker; under-por piped stdin the CLI exits with an error rather than starting a new session, so pass an explicit--resume=SESSION-IDor--continue. --session-id ID: exact-match resume; creates a new session only if the value is a valid UUID and nothing matches. This lets an adapter choose its own session id up front. Do not combine with--resume/--continue.-n NAME/--name=NAMEnames a new session.
4. Permissions / sandbox
- Without any permission options, requests needing approval are denied in non-interactive runs.
--allow-all(alias--yolo) =--allow-all-tools --allow-all-paths --allow-all-urls; envCOPILOT_ALLOW_ALL.--assisted-approval(envCOPILOT_ASSISTED_APPROVAL=true): model safety review approves eligible requests; non-interactive only.--sandbox/--no-sandbox: OS-level shell sandbox for the session.--available-tools,--excluded-tools: restrict the tool set visible to the model.- Shell allow-listing: yes, by flag. Pattern is
Kind(argument), argument optional:
copilot --allow-tool='shell(git:*)' --deny-tool='shell(git push)'
copilot -p "..." --allow-tool='shell(npm:*), write' --no-ask-user
- Kinds:
shell,read,write,url,memory, or an MCP server name (MyMCP(create_issue),MyMCP). shell(git:*)matches the stem followed by a space (git push, notgitea);shell(npm test)is an exact command.- Multiple values: one quoted, comma-separated list. Deny always beats allow, even with
--allow-all. - URLs:
--allow-url,--deny-url. - Persisting an allow-list in a project file (rather than flags): unconfirmed.
5. Model / limits
--model=MODEL(autoallowed); envCOPILOT_MODEL;--effort/--reasoning-effortlow|medium|high|xhigh|max.- Limits:
--max-autopilot-continues=COUNT(default 5);--max-ai-credits=CREDITS(soft cap per response, resets per user message). - A hard max-turns flag for a plain
-prun: unconfirmed (none beyond the two above).
6. MCP config
- User:
~/.copilot/mcp-config.json($COPILOT_HOMEoverrides the directory). - Project:
.mcp.json(any directory from cwd up to the repo root) or.github/mcp.json. In the same directory.mcp.jsonwins; closer-to-cwd wins; project overrides user..vscode/mcp.jsonis not read (it uses the unsupported top-level keyservers).
{ "mcpServers": { "some-server": { "type": "local", "command": "npx", "args": ["-y", "some-package", "mcp"], "tools": ["*"] } } }
- Local fields:
command(required),args(required),tools(listed as required in the reference;["*"]for all),env(supports$VAR,${VAR},${VAR:-default}),cwd,timeout(ms, default 30000),type("local"or"stdio", default"local"),deferTools,disableToolCache,slowConnectionThresholdMs.- Inconsistency in the docs: the reference marks
toolsrequired, but the project-level example on the MCP how-to page omits it. Writing"tools": ["*"]satisfies both.
- Inconsistency in the docs: the reference marks
- Project files may use either the
mcpServerswrapper or a bare top-level map of server names. - Headless trap: in
copilot -p, project-level MCP servers load only if the directory is already trusted; otherwise they are silently skipped. To load them: setGITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true, or pass--trust-folder(one new non-interactive session; cannot be combined with--resume,--continue,--session-id). - Per-session alternative that avoids the trust question:
--additional-mcp-config=<JSON or @file>. - CLI:
copilot mcp add SERVER-NAME -- COMMAND [ARGS...]writes user config only (--env,--transport stdio|http|sse,--tools,--timeout,--json). There is no project-scope flag; project files must be edited directly.
7. Instructions / skills
- All of these are loaded and merged (Git root and cwd):
AGENTS.md,CLAUDE.md,GEMINI.md,.github/copilot-instructions.md,.github/instructions/**/*.instructions.md,.claude/rules/**/*.md. User:$HOME/.copilot/copilot-instructions.md,$HOME/.copilot/instructions/**/*.instructions.md. Extra dirs:COPILOT_CUSTOM_INSTRUCTIONS_DIRS. Disable with--no-custom-instructions. - Skills: yes. Project
.github/skills/,.agents/skills/,.claude/skills/(parent.github/skills/inherited in monorepos). Personal~/.copilot/skills/,~/.agents/skills/. Extra:COPILOT_SKILLS_DIRS.SKILL.mdfrontmatternameanddescriptionrequired; optionallicense,allowed-tools. CLI:copilot skill add [--project] <path>.
8. CI auth
- Precedence:
COPILOT_GITHUB_TOKEN>GH_TOKEN>GITHUB_TOKEN> keychain OAuth >gh auth token. - Supported: fine-grained PAT (
github_pat_, owned by a personal account, with the Copilot Requests account permission), OAuth (gho_), GitHub App user-to-server (ghu_). Classic PATs (ghp_) are not supported. copilot login --with-tokenreads a token from stdin. An exportedGH_TOKENsilently overrides a stored login.- Whether the default Actions-provided
GITHUB_TOKEN(an installation token) is accepted: unconfirmed — the docs' own Actions example uses a PAT secret inCOPILOT_GITHUB_TOKEN. - BYOK:
COPILOT_PROVIDER_*env vars /providers.json; no GitHub auth needed in that mode.
9. Status: actively maintained. github/copilot-cli latest stable v1.0.112 (2026-11-13), prereleases daily. Install/pin: npm install -g @github/copilot@VERSION.
Summary table
| Tool | Headless cmd | JSON flag | Resume | Project MCP file | Instructions file | Confidence |
|---|---|---|---|---|---|---|
| Codex CLI | codex exec "<p>" (stdin: -; cwd: -C) |
--json (JSONL) |
codex exec resume <id> [p] |
.codex/config.toml (TOML [mcp_servers.x]; trusted projects only) |
AGENTS.md |
high |
| Gemini CLI | gemini -p "<p>" (cwd flag unconfirmed) |
--output-format stream-json or json |
--resume <id> (with -p unconfirmed) |
.gemini/settings.json (mcpServers) |
GEMINI.md (AGENTS.md opt-in) |
high |
| Antigravity CLI | agy -p "<p>" (cwd flag unconfirmed) |
--output-format stream-json or json |
--conversation <id> |
.agents/mcp_config.json (mcpServers) |
AGENTS.md or GEMINI.md; .agents/rules/*.md |
medium |
| Cursor CLI | agent -p "<p>" (cursor-agent alias; cwd: --workspace) |
--output-format stream-json or json |
--resume <chatId> (with -p unconfirmed) |
.cursor/mcp.json (mcpServers) |
.cursor/rules/*.mdc, AGENTS.md |
high |
| OpenCode 2.x | opencode run "<p>" (cwd: process cwd + PWD) |
--format json (NDJSON; shapes source-derived) |
--session <id> |
opencode.json (mcp.servers.x, command array) |
AGENTS.md |
high for config, medium for events |
| Copilot CLI | copilot -p "<p>" (cwd: -C) |
--output-format=json (JSONL; event shapes unconfirmed) |
--resume=<id> / --session-id <id> |
.mcp.json or .github/mcp.json (mcpServers; skipped in -p unless trusted) |
AGENTS.md, .github/copilot-instructions.md |
high for flags/config, low for events |
Part 3. Verified platform facts
Verified on 2026-11-16. Row format: claim | verdict (confirmed / changed / not found) | what is true | source.
Nothing was installed. Registry facts come from npm view; GitHub facts from gh api; docs were fetched and read directly.
Not live-tested: anything requiring a write (publishing, pushing refs). Those rows say so.
A. npm packages (registry, 2026-11-16)
Install scripts: of the 28 packages, only esbuild declares one (postinstall: node install.js). Checked via npm view <pkg> scripts on the top-level package only, not on transitive dependencies.
| package | latest stable | engines / peers worth knowing | install script |
|---|---|---|---|
| zod | 4.6.7 | none | no |
| yaml | 2.9.1 | node >=14.6 (next = 3.0.0-2) |
no |
| js-yaml | 5.5.0 | v4-legacy tag = 4.3.2 |
no |
| hono | 4.13.19 | node >=16.9.0 (next = 5.0.0-rc.1) |
no |
| @hono/node-server | 2.1.8 | node >=20; peer hono ^4 || ^5.0.0-0 (1.x line: 1.19.19) | no |
| picocolors | 1.1.1 | none | no |
| preact | 11.2.0 | optional peer preact-render-to-string >=6.7.0 | no |
| @preact/signals | 2.11.4 | peer preact >=10.25.0 || >=11.0.0-0 | no |
| @preact/preset-vite | 2.10.6 | peer vite 2.x-8.x, @babel/core 7.x | no |
| vite | 8.3.8 | node ^20.19.0 || >=22.12.0; optional peer esbuild ^0.27 || ^0.28 | no |
| vitest | 5.1.0 | node ^22.12.0 || ^24.0.0 || >=26.0.0; peer vite ^6.4 || ^7 || ^8; @types/node ^22 || >=24 | no |
| @vitest/coverage-v8 | 5.1.0 | peer vitest 5.1.0 (exact match required) | no |
| fast-check | 4.10.2 | node >=12.17.0 | no |
| @playwright/test | 1.65.1 | node >=20 | no |
| @axe-core/playwright | 4.14.0 | node >=22.12.0; peer playwright-core >=1.0.0 | no |
| @biomejs/biome | 2.6.8 | node >=14.21.3; binaries via optionalDependencies @biomejs/cli-* |
no |
| typescript | 7.0.2 | node >=16.20.0 (7.0.2 published 2026-07-08; last 6.x = 6.0.3; beta = 7.1.0-beta) |
no |
| esbuild | 0.28.2 | node >=18 | YES (postinstall) |
| tsx | 4.23.15 | node >=18 | no |
| marked | 18.2.1 | node >=20 | no |
| dompurify | 3.4.18 | none | no |
| @types/node | 26.6.6 | - | no |
| mcp-handler | 2.4.0 | node >=20; peer @modelcontextprotocol/server ^2.0.0 (required); next >=13 optional | no |
| @modelcontextprotocol/sdk | 1.32.2 | LEGACY v1 line; node >=18; peer zod ^3.25 || ^4.0 | no |
| @modelcontextprotocol/server | 2.4.0 | node >=20; deps zod ^4.2.0, @modelcontextprotocol/core 2.4.0 | no |
| @modelcontextprotocol/client | 2.4.0 | node >=20; deps zod ^4.2.0, cross-spawn, eventsource, jose | no |
| @modelcontextprotocol/node | 2.1.2 | node >=20; peer @modelcontextprotocol/server ^2.4.0 | no |
| release-please | 17.11.2 | node >=22.0.0 | no |
Also: npm CLI latest = 12.2.2.
Compatibility notes that follow from the table:
- vitest 5 and @axe-core/playwright both need Node >=22.12, so the dev toolchain floor is Node 22.12 regardless of the runtime floor.
- esbuild is the only package that runs code at install time.
npm ci --ignore-scriptsbreaks esbuild unless its platform binary is resolved via optionalDependencies (it normally is; the postinstall is a fallback/validation step).
B. MCP TypeScript SDK
| claim | verdict | what is true | source |
|---|---|---|---|
The official package is @modelcontextprotocol/sdk |
changed | The current official SDK is the split v2 line: @modelcontextprotocol/server and @modelcontextprotocol/client, both 2.4.0, both on the latest dist-tag. @modelcontextprotocol/sdk (1.32.2) is the legacy v1 line on the v1.x branch, receiving bug and security fixes for at least six months after the v2 release (2026-07-27). |
repo README @ v2.4.0; npm view ... dist-tags |
| 2.x is pre-release | changed | 2.x is stable. 2.0.0 shipped 2026-07-27; GitHub release v2.4.0 (2026-10-23) is not marked prerelease. | gh api repos/modelcontextprotocol/typescript-sdk/releases |
| Current protocol revision | changed | 2026-07-28. SDK v2 serves it natively and also serves 2025-era clients from the same entry points. |
repo README; docs/protocol-versions.md |
| Tool annotations exist | confirmed | title (string), readOnlyHint, destructiveHint, idempotentHint, openWorldHint (booleans). All optional, hints only; they never change execution. |
ToolAnnotationsSchema in package dist; docs/servers/tools.md |
server.tool()/resource()/prompt() |
changed | Removed in v2. Use registerTool, registerResource, registerPrompt. Raw-shape inputSchema is deprecated; pass z.object({...}). |
docs/migration/upgrade-to-v2.md; d.mts |
| Zod 4 supported | confirmed | Schemas are Standard Schema; Zod v4, Valibot, ArkType all work. SDK depends on zod ^4.2.0. | README |
Other facts: ESM-first ("type": "module", CJS exports also present). Node >=20. README notes TypeScript >=6 needs "types": ["node"] in tsconfig.
Export maps (read from the published tarballs):
@modelcontextprotocol/server:.,./stdio,./ext/skills,./ext/skills/node,./validators/ajv,./validators/cf-worker@modelcontextprotocol/client:.,./stdio,./ext/skills,./validators/*
Server (stdio), from the v2.4.0 docs:
import { McpServer } from '@modelcontextprotocol/server';
import { serveStdio } from '@modelcontextprotocol/server/stdio';
import * as z from 'zod/v4'; // `import { z } from 'zod'` is equivalent now that zod latest is 4.x
function createServer(): McpServer {
const server = new McpServer(
{ name: 'my-server', version: '1.0.0' },
{ instructions: 'How and when to use this server.' } // second arg = ServerOptions
);
server.registerTool(
'get-thing',
{
title: 'Get thing',
description: 'Fetch one thing by id',
inputSchema: z.object({ id: z.string().describe('Thing id') }),
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
},
async ({ id }) => {
if (!id) return { content: [{ type: 'text', text: 'id is required' }], isError: true };
return { content: [{ type: 'text', text: `thing ${id}` }] };
}
);
server.registerResource(
'config',
'config://app',
{ title: 'Application Config', description: 'Current config', mimeType: 'text/plain' },
async uri => ({ contents: [{ uri: uri.href, text: '...' }] })
);
server.registerPrompt(
'review-code',
{ title: 'Code Review', description: 'Review code', argsSchema: z.object({ code: z.string() }) },
({ code }) => ({ messages: [{ role: 'user' as const, content: { type: 'text' as const, text: `Review:\n\n${code}` } }] })
);
return server;
}
void serveStdio(createServer); // preferred v2 entry; returns a handle with close()
console.error('running on stdio'); // never console.log: stdout is the protocol channel
Still valid (shown in the repo README): import { StdioServerTransport } from '@modelcontextprotocol/server/stdio'; await server.connect(new StdioServerTransport());
Error semantics: a handler returning isError: true, a handler that throws, and arguments the schema rejects all come back to the client as ordinary results with isError: true. An unknown tool name is a protocol error and throws out of callTool.
Constructor signature: new McpServer(serverInfo: Implementation, options?: ServerOptions & { maxToolInputElements?: number }). ServerOptions carries instructions?: string and capabilities?.
Client (tests):
import { Client } from '@modelcontextprotocol/client';
import { StdioClientTransport } from '@modelcontextprotocol/client/stdio';
const client = new Client({ name: 'test-harness', version: '1.0.0' });
await client.connect(new StdioClientTransport({ command: 'node', args: ['dist/server.js'] })); // also env, cwd, stderr
const { tools } = await client.listTools();
const result = await client.callTool({ name: 'get-thing', arguments: { id: '1' } });
// result.content, result.isError, result.structuredContent
await client.close(); // ends the child process
In-process test without spawning (docs/testing.md):
import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/client';
import { createMcpHandler } from '@modelcontextprotocol/server';
const handler = createMcpHandler(createServer);
const transport = new StreamableHTTPClientTransport(new URL('http://test.local/mcp'), {
fetch: (url, init) => handler.fetch(new Request(url, init)),
});
const client = new Client({ name: 'test-harness', version: '1.0.0' }, { versionNegotiation: { mode: 'auto' } });
await client.connect(transport);
// teardown: await client.close(); await handler.close();
InMemoryTransport.createLinkedPair() (exported from both packages) also works but connects 2025-era instances only.
Client versionNegotiation: default is legacy (2025 initialize handshake); { mode: 'auto' } probes server/discover and falls back; { pin: '2026-07-28' } pins.
mcp-handler
| claim | verdict | what is true | source |
|---|---|---|---|
| Latest version | confirmed | 2.4.0, published 2026-11-12, node >=20 | npm view mcp-handler |
Peer-depends on @modelcontextprotocol/sdk |
changed | 2.x peer-depends on @modelcontextprotocol/server ^2.0.0 and needs zod ^4.2.0. mcp-handler 1.x is the line for sdk 1.x. |
package.json in tarball; README |
| Next.js only | changed | Framework-agnostic. Returns a Web-standard (request: Request) => Promise<Response>; next is an optional peer and is not imported by the dist. Mount in Hono with c.req.raw. It does not inspect the pathname. |
README; dist inspection |
createMcpHandler, withMcpAuth exist |
confirmed | Both exported, plus protectedResourceHandler, metadataCorsOptionsRequestHandler, generateProtectedResourceMetadata, getPublicOrigin, getPublicUrl. |
d.ts in tarball |
| SSE / Redis | changed | Removed in 2.x. Serving is stateless; GET/DELETE session operations answer 405. | README |
Signatures:
createMcpHandler(initializeServer: (server: McpServer) => void | Promise<void>, options?: ServerOptions & { serverInfo?: { name, version }; verboseLogs?; onEvent?; maxSubscriptions? })soinstructionsandcapabilitiesgo inoptions.withMcpAuth(handler, verifyToken: (req: Request, bearerToken?: string) => AuthInfo | undefined | Promise<AuthInfo | undefined>, { required?, requiredScopes?, resourceMetadataPath?, resourceUrl? })protectedResourceHandler({ authServerUrls: string[], resourceUrl?: string }): (req: Request) => Response
import type { AuthInfo } from '@modelcontextprotocol/server';
import { createMcpHandler, withMcpAuth, protectedResourceHandler, metadataCorsOptionsRequestHandler } from 'mcp-handler';
import { z } from 'zod';
const handler = createMcpHandler(
server => {
server.registerTool(
'echo',
{ title: 'Echo', description: 'Echo a message', inputSchema: z.object({ message: z.string() }) },
async ({ message }, ctx) => ({ content: [{ type: 'text', text: `Echo: ${message}` }] }) // ctx.http?.authInfo
);
},
{ serverInfo: { name: 'my-server', version: '1.0.0' }, instructions: '...' }
);
const verifyToken = async (_req: Request, bearerToken?: string): Promise<AuthInfo | undefined> => {
if (!bearerToken) return undefined;
// verify the token here
return { token: bearerToken, scopes: ['read:stuff'], clientId: 'user123', extra: {} };
};
const authHandler = withMcpAuth(handler, verifyToken, {
required: true, // without this, unauthenticated requests still pass even with requiredScopes set
requiredScopes: ['read:stuff'],
resourceMetadataPath: '/.well-known/oauth-protected-resource',
});
// Next.js: export { authHandler as GET, authHandler as POST };
// Hono: app.all('/mcp', c => authHandler(c.req.raw));
// Metadata route (RFC 9728):
const metadata = protectedResourceHandler({ authServerUrls: ['https://auth.example.com'] });
const cors = metadataCorsOptionsRequestHandler();
// Next.js: export { metadata as GET, cors as OPTIONS };
Responses: 401 on missing or invalid token, 403 on insufficient scope, each with an RFC 9728 WWW-Authenticate challenge.
Alternative without mcp-handler: the SDK's own root export has createMcpHandler, requireBearerAuth, verifyBearerToken, buildOAuthProtectedResourceMetadata; a @modelcontextprotocol/hono adapter also exists.
C. Node.js release lines
| claim | verdict | what is true | source |
|---|---|---|---|
| Node 20 EOL 2026-04-30 | confirmed | Already EOL. Last release 20.20.2. | nodejs/Release schedule.json |
| Node 22 status | confirmed | "Jod", Maintenance LTS, EOL 2027-04-30. Latest 22.23.5, bundles npm 10.9.9. | schedule.json; nodejs.org/dist/index.json |
| Node 24 status | changed | "Krypton" moved to Maintenance LTS on 2026-10-20. EOL 2028-04-30. Latest 24.22.3, bundles npm 11.19.1. | same |
| Node 26 status | changed | "Lithium" became Active LTS on 2026-10-28 (released 2026-05-05). Maintenance 2027-10-20, EOL 2029-04-30. Latest 26.13.1, bundles npm 11.20.0. There is no separate "Current" line: 25 went EOL 2026-06-01 and 27 is alpha only. | same |
| Node 26 available in actions/setup-node | confirmed | actions/node-versions manifest lists 26.13.1, 24.22.3, 22.23.5. | gh api repos/actions/node-versions/contents/versions-manifest.json |
util.parseArgs stable in Node 22 |
confirmed | Added 18.3.0 / 16.17.0, stable since 20.0.0. | Node docs JSON |
fs.glob in Node 22 |
changed | Added 22.0.0 as experimental; stable from 22.17.0. Covers fs.glob, fs.globSync, fsPromises.glob. |
Node docs JSON |
--experimental-strip-types needed in Node 22 |
changed | Flag added 22.6.0. Type stripping is on by default with no warning from 22.18.0, so the flag is unnecessary there. Stable in 24.12.0 / 25.2.0. --experimental-transform-types was removed in 26.0.0 (so enums and namespaces with runtime code will not run natively). |
Node docs JSON |
D. npm trusted publishing
| claim | verdict | what is true | source |
|---|---|---|---|
| Uses OIDC | confirmed | Supported on GitHub Actions (GitHub-hosted runners), GitLab CI/CD shared runners, CircleCI cloud. Self-hosted runners are not supported. | docs.npmjs.com/trusted-publishers |
| Minimum npm 11.5.1 | changed | npm >=11.5.1 AND Node >=22.14.0. Node 22 bundles npm 10.9.9, which is too old; use Node 24 or 26, or upgrade npm in the job. | same |
| No token needed | confirmed | No long-lived token for publish. A read-only granular token is still suggested if the job installs private dependencies. | same |
| Provenance is automatic | confirmed | Automatic when publishing a public package from a public repo via GitHub Actions or GitLab. Not for private repos, not for CircleCI. --provenance is not needed. |
same |
| Workflow requirements | confirmed | permissions: { id-token: write, contents: read }; actions/setup-node with registry-url: 'https://registry.npmjs.org'; plain npm publish. The docs example also sets package-manager-cache: false. repository.url in package.json must exactly match the GitHub repo. |
same |
Other: up to 10 trusted publishers per package; the config is not validated when saved; a new config must complete a first successful publish within 2 days or it expires. Not live-tested (no publish performed).
E. GitHub Actions
All tags were resolved to commit SHAs through gh api. Twelve are lightweight tags pointing straight at commits; github/codeql-action v4.39.3 is an annotated tag and was dereferenced to its commit.
| action | tag | sha |
|---|---|---|
| actions/checkout | v7.0.1 | 3d3c42e5aac5ba805825da76410c181273ba90b1 |
| actions/setup-node | v7.1.0 | 949feb2413d6458794dcd2491c4babbbce0c15c1 |
| actions/cache | v6.1.0 | 55cc8345863c7cc4c66a329aec7e433d2d1c52a9 |
| actions/upload-artifact | v7.0.2 | cf430e030ddbb5b0abf93d22962f4752f3646cd9 |
| actions/download-artifact | v8.0.2 | 9000827ccba6bdab643e8b6fd33ac0654aef8333 |
| oven-sh/setup-bun | v2.2.0 | 0c5077e51419868618aeaa5fe8019c62421857d6 |
| github/codeql-action (init, analyze) | v4.39.3 | 33d7b85da1a04171e211befe2c739303b9a4c066 |
| actions/dependency-review-action | v5.0.0 | a1d282b36b6f3519aa1f3fc636f609c47dddb294 |
| googleapis/release-please-action | v5.0.0 | 45996ed1f6d02564a971a2fa1b5860e934307cf7 |
| actions/configure-pages | v6.0.0 | 45bfe0192ca1faeb007ade9deae92b16b8254a0d |
| actions/upload-pages-artifact | v5.0.0 | fc324d3547104276b827a68afc52ff2a11cc49c9 |
| actions/deploy-pages | v5.0.1 | 368f82528645a54fb793d4d04e342629a3f51346 |
| amannn/action-semantic-pull-request | v6.1.2 | 2252a14e810aa9b85c2d560bd7070c802206ecf6 |
Usage form: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1. For CodeQL: github/codeql-action/init@<sha> and github/codeql-action/analyze@<sha> with the same SHA.
Caveat: releases/latest on github/codeql-action returns codeql-bundle-v2.27.4, a CLI bundle tag, not an action version. v4.39.3 is the newest v4.* action tag.
| claim | verdict | what is true | source |
|---|---|---|---|
| Minute multipliers (Linux 1x, Windows 2x, macOS 10x) | changed | Docs now give per-minute USD rates per runner SKU: Linux 1-core slim $0.002, Linux 2-core x64 $0.006, Linux 2-core arm64 $0.005, Windows 2-core $0.010, macOS 3-4 core $0.062. Relative to Linux x64 that is about 1.67x for Windows and about 10.3x for macOS. Included usage is a monthly dollar amount (Free $12, Pro/Team $18, Enterprise Cloud $300). Job minutes round up. | docs.github.com Actions billing page |
| Public repos are free | confirmed | Standard GitHub-hosted runners are free in public repositories. Larger runners are always billed. | same |
ubuntu-latest |
confirmed | Ubuntu 24.04. ubuntu-26.04 exists but is not yet -latest. Also ubuntu-22.04, ubuntu-slim, ubuntu-24.04-arm, ubuntu-26.04-arm. |
docs.github.com GitHub-hosted runners page |
windows-latest |
changed | Windows Server 2025 with VS 2026 (windows-2025, windows-2025-vs2026). Also windows-2022, windows-11-arm. |
same |
macos-latest |
changed | macOS 26 arm64 (macos-26). Also macos-15, macos-15-intel, macos-26-intel. |
same |
Runner sizes: public repos get 4 CPU / 16 GB on Linux and Windows; private get 2 CPU / 8 GB; macOS arm64 is 3 CPU / 7 GB.
F. GitHub API
| claim | verdict | what is true | source |
|---|---|---|---|
| Git Data API can commit multiple files atomically | confirmed | POST /git/blobs -> POST /git/trees (with base_tree) -> POST /git/commits -> PATCH /git/refs/{ref}. Tree entries take path, mode (100644, 100755, 040000, 160000, 120000), type, and either sha or content (not both). sha: null deletes a path. Omitting base_tree drops every file not listed. |
docs.github.com REST git/trees, git/commits, git/refs |
force: false rejects non-fast-forward with 422 |
confirmed (docs only) | force defaults to false; documented status codes are 200, 409, 422. A non-fast-forward gives 422 "Update is not a fast forward". Not live-tested: no writes were permitted in this research. |
docs.github.com REST git/refs |
| ETag / 304 does not count against rate limit | changed | Only when the request is made "while correctly authorized with an Authorization header". Unauthenticated 304s are not covered by that statement. |
docs.github.com REST best practices |
| Fine-grained PAT "Contents: read and write" is sufficient | confirmed, one exception | "Contents" read covers the GETs; "Contents" write covers POST blobs/trees/commits/refs, PATCH refs, PUT/DELETE contents. Writing anything under .github/workflows/ additionally needs "Workflows: write". |
docs.github.com fine-grained PAT permissions page (section repository-permissions-for-contents) |
G. Vercel
| claim | verdict | what is true | source |
|---|---|---|---|
| No persistent disk | confirmed | "Read-only filesystem with writable /tmp scratch space up to 500 MB". /tmp belongs to one function instance, is not shared, and does not survive the instance. |
vercel.com/docs/functions/runtimes |
| Fetch-style handler supported | confirmed | In /api: export default { fetch(request: Request) { return new Response('...') } }, or named method exports export function GET(request: Request). Needs "type": "module" (or .mjs) when no framework is in use. |
vercel.com/docs/functions/functions-api-reference |
| Hono is zero-config | confirmed | An entry file that imports hono at `app |
index |
vercel.json rewrites for SPA + API |
confirmed | { "$schema": "https://openapi.vercel.sh/vercel.json", "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] } is the documented SPA fallback. The filesystem (static files and functions under /api) takes precedence over rewrites, so /api/* function files are served before the catch-all applies. |
vercel.com/docs/project-configuration/vercel-json |
Config file is vercel.json |
changed (additive) | vercel.json, vercel.toml, or vercel.ts; only one per project. now.json support ended 2026-03-31. |
vercel.com/docs/project-configuration |
| Default Node version | changed | 26.x is the default for new projects; 24.x and 22.x are also available. Set via engines.node in package.json or project settings. |
vercel.com/docs/functions/runtimes/node-js/node-js-versions |
Additional notes:
- Hobby plan: at most 12 functions per deployment when each file under
api/maps to its own function. A single Hono entry avoids this. - For a Hono backend plus a separate frontend in one project, the docs point to "Vercel Services" (Beta on all plans): a
servicesmap invercel.jsonplus top-level rewrites of the form{ "source": "/api/(.*)", "destination": { "service": "my_backend" } }. Withservicespresent,buildCommand,outputDirectory,framework, andfunctionsmove into each service. - Functions run with Fluid compute by default.
export const config = { runtime: 'nodejs', maxDuration: 15 }is the per-function form;waitUntilcomes from@vercel/functions.
H. Tooling notes
| claim | verdict | what is true | source |
|---|---|---|---|
| Biome latest major and config file | confirmed | Major 2 (2.6.8). Config is biome.json or biome.jsonc. Schema: https://biomejs.dev/schemas/2.6.8/schema.json (returns 200; the schema's own description names both filenames). |
npm; biomejs.dev schema |
| Vitest latest major | changed | Major 5 (5.1.0). Requires Node ^22.12.0 || ^24.0.0 || >=26.0.0 and vite ^6.4 || ^7 || ^8. | npm |
Vitest coverage.thresholds |
confirmed | Still coverage.thresholds with lines, functions, branches, statements. Providers v8 and istanbul. |
vitest docs/config/coverage.md @ v5.1.0 |
Vitest projects |
confirmed | test.projects (type TestProjectConfiguration[]). A config that declares projects does not run tests itself. Not supported inside an inline project config. No workspace page exists in the v5 config docs. |
vitest docs/config/projects.md @ v5.1.0 |
| Playwright latest | confirmed | 1.65.1, node >=20. | npm |
| Vite latest major and Node requirement | changed | Major 8 (8.3.8). Node ^20.19.0 || >=22.12.0. | npm |
Zod 4 z.toJSONSchema() is native |
confirmed | Exported from the root zod entry (v4/classic/external.d.ts re-exports toJSONSchema). Signature: toJSONSchema(schema, params?), also accepts a registry. |
zod@4.6.7 tarball |
| Zod import path | confirmed | import { z } from 'zod' or import * as z from 'zod' is Zod 4, since latest is 4.6.7 and the root entry re-exports v4/classic. zod/v4 is an equivalent subpath and is what the MCP SDK docs use. zod/v3 and zod/mini also exist. |
zod@4.6.7 exports map and index.d.ts |
| TypeScript version | changed | latest is 7.0.2 (published 2026-07-08). 6.0.3 was the last 6.x. Still exposes the tsc bin. Worth checking that every tool in the chain accepts TS 7 before pinning it. |
npm |
Other tools, read 2026-11-25
The facts the README's comparison table uses. Each was read on 2026-11-25 from the project's
own README on its default branch and from GitHub's API (gh api repos/<owner>/<name>, for
stars and the licence GitHub detects). Where a README does not describe something, the table
says so rather than guessing. The brief (A4) gave older figures; where they differ, these win.
| Tool | Fact | Value | Source |
|---|---|---|---|
Backlog.md (MrLesk/Backlog.md) |
Stars, licence | 7,486; MIT | GitHub API |
| Backlog.md | Where the board lives | Markdown task files in the repository, with a CLI, a terminal board and a web UI (backlog browser) |
README |
| Backlog.md | Agents | An MCP server; milestones, dependencies and acceptance criteria. It does not describe starting or supervising agents, nor sprints | README |
| Backlog.md | Static export | A generated folder "with a static host such as GitHub Pages or GitLab Pages" | README |
Vibe Kanban (BloopAI/vibe-kanban) |
Stars, licence | 28,812; Apache-2.0 | GitHub API |
| Vibe Kanban | State | Its README's headline: "Vibe Kanban is sunsetting.", linking https://www.vibekanban.com/blog/shutdown. The date and what follows were not checked | README |
| Vibe Kanban | What it is | Run with npx vibe-kanban; kanban issues, then "workspaces where coding agents can execute"; an MCP server (MCP_HOST); a self-hostable cloud |
README |
Multica (multica-ai/multica) |
Stars, licence | 57,840; Apache-2.0 "subject to the additional conditions" in its LICENSE, which restrict offering it as a hosted or embedded service and the use of its branding | GitHub API, LICENSE |
| Multica | What you run | A Go server, a Next.js web app and PostgreSQL 17, on its cloud or self-hosted with Docker Compose or Helm, and a daemon on each machine that runs agents | README |
| Multica | Planning | "projects, workflows, and Gantt views, but no sprints, cycles, or roadmaps" | README |
Beads (gastownhall/beads) |
Stars, licence | 29,042; MIT. "A memory upgrade for your coding agent": an issue tracker for agents, which Clara imports from | GitHub API, README |
Other tools, read 2026-11-30
The facts the comparison's newer rows use, read again on 2026-11-30 from each project's README
on its default branch (gh api repos/<owner>/<name>/readme) and GitHub's API. The rows from
2026-11-25 above still hold. Where a README does not describe something, the table says so.
| Tool | Fact | Value | Source |
|---|---|---|---|
| Backlog.md | Stars, licence | 7,538; MIT | GitHub API |
| Backlog.md | Notes and memory | Documents and decisions as Markdown, found with backlog search; the agent writes its implementation plan into the task, and the README speaks of a task's "plan/notes/final summary" |
README |
| Backlog.md | A map of the code | Groma.md, "a separate install", scans the repository into a C4 map stored as Open Knowledge Format files and reads Backlog.md's tasks | README |
| Backlog.md | Checks | Acceptance criteria and a Definition of Done checklist per task; tests are run by the person at review checkpoint #3 | README |
| Backlog.md | Statistics | "The board, task list, and statistics" in its web UI and static export | README |
| Backlog.md | Accounts, telemetry | "no server, no account, no telemetry" | README |
| Backlog.md | Importers | Not described | README |
| Vibe Kanban | Stars, licence | 28,866; Apache-2.0 | GitHub API |
| Vibe Kanban | State | The README still opens with "Vibe Kanban is sunsetting." | README |
| Vibe Kanban | Notes, memory, checks, statistics, importers, telemetry | Not described | README |
| Multica | Stars | 58,527 | GitHub API |
| Multica | Notes and memory | Projects "attach the repos and docs agents need as context"; skills "turn a solved problem into a playbook every agent reuses"; "the intent, the run, the decisions, and the diff stay connected to the same issue" | README |
| Multica | Checks | "Review gates": "Work lands in review, not in main"; failed runs retry or stop. Running a project's own checks before review is not described | README |
| Multica | Statistics | "Usage analytics": "what each run cost, per agent and per issue" | README |
| Multica | Accounts, telemetry | Its cloud is signed up for; a self-hosted server "sends one anonymous, deployment-level snapshot a day" unless DO_NOT_TRACK=1 |
README |
| Multica | Importers | Not described | README |
| Backlog.md | What a new session starts from | The task it is told to work on ("Work on BACK-10 only. Research the codebase and write an implementation plan in the task.") | README |