Repository navigation
Evidence Claude Code
Alexander Kurganov edited this page Nov 26, 2026
·
15 revisions
Evidence for the facts about Claude Code that the repository states in docs/clients.md. A heading here matches a heading there.
Read in the documentation on 2026-11-05, except the pages of Subagent events, read on 2026-11-11.
- How the runs were set up.
Every run used the plugin of this repository,
plugins/model-router, from a checkout, through a non-interactive command of theclaudeCLI. The command, the release, the date and the platform of each run are on itsSeen:line.
Read in the documentation on 2026-11-05.
- The manifest file and the plugin root layout. Documentation: Plugin manifest reference, Manifest file
- An unrecognized top-level field is stripped, the plugin loads, and
claude plugin validatereports the field as a warning. Documentation: Plugin manifest reference, Unrecognized fields - An unknown key inside a
userConfigoption is an error. Documentation: Plugin manifest reference, Unrecognized fields - The required and accepted fields of a
userConfigoption. Documentation: Plugin manifest reference, User configuration -
optionslimits astringoption that is neithermultiplenorsensitive,/configshows a picker,defaultis one of the listed values, and the release before which a plugin that declaresoptionscannot load. Documentation: Plugin manifest reference, Limit a field to fixed options - Non-sensitive values are saved under
pluginConfigsinsettings.json, andsensitivevalues in the platform's secure credential store. Documentation: Plugin manifest reference, Where values are stored - Stored plugin options are read from the user settings, a
--settingsfile and the managed settings, not from the project settings, and an option found in none takes its manifest default. Seen: Claude Code 2.1.318 on 2026-11-22, an interactive session with--debug-file <log>and no stored option. At the start of the session the debug log heldno pluginConfigs["model-router" or "model-router@inline"].options in user, --settings or managed settings (project settings are not read); every option is its default. - A stored
pluginConfigsvalue under a key that the manifest does not declare survives load and update. Source: the published package@anthropic-ai/claude-code, bundled code of 2.1.318, read on 2026-11-25. The loader merges the manifest defaults with the stored values. It drops a stored key only for an option that declaresoptionswhen the stored value lies outside the list. No writer prunes the stored values by the manifest. - A stored
pluginConfigsvalue under a key that the manifest does not declare reaches theoptionsargument ofregister, when the manifest declares at least one option. Source: the published package@anthropic-ai/claude-code, bundled code of 2.1.318, read on 2026-11-25. The loader's merge copies every stored key. It drops only the value of a declared option that lies outside the option'soptionslist. It returns nothing when the manifest declares no option. Documentation: Mods reference saysoptionsholds the declared fields. That is narrower than the code. - No settings surface lists such a key: not
/config, not/plugin configure, not the desktop app's plugin settings. Source: the published package@anthropic-ai/claude-code, bundled code of 2.1.318, read on 2026-11-25. The rows of/configcome from the manifest'suserConfig./plugin configureandclaude plugin configurewalkmanifest.userConfigonly. The desktop app's plugin settings keep only keys that the manifest declares, byObject.hasOwn(declared, key), Claude desktop 7.37095.0. -
/configshows a row for each option, exceptsensitiveoptions andmultiplelists. Documentation: Plugin manifest reference, User configuration -
commandstakes an object map from a command name tosourceorcontent, each value sets exactly one of the two,descriptionandargumentHintare optional, and the key becomes the command name after the plugin prefix. Documentation: Plugin manifest reference, commands -
skillstakes a path or an array of directory paths,"."names the plugin root, the listed directories add to the defaultskills/scan, and the release that"."needs. Documentation: Plugin manifest reference, Path rules - Every component path starts with
./, exists, and resolves inside the plugin root. Documentation: Plugin manifest reference, Path rules - Anthropic's directory reads
privacyPolicyUrland four other listing fields fromplugin.jsononly, andclaude plugin validatereports each one as an unknown field in a catalogue entry. Documentation: Plugin manifest reference, Directory listing fields
Read in the documentation on 2026-11-05.
- The catalogue file and how relative sources resolve. Documentation: Marketplace reference, Marketplace file
- The catalogue requires
name,owner(withowner.name) andplugins, and a missingdescriptionraises a warning. Documentation: Marketplace reference, Top-level fields, Validation messages - Each entry requires
nameandsource. Documentation: Marketplace reference, Plugin entries - A relative
sourcestarts with./, and the failures of other forms. Documentation: Marketplace reference, Relative path plugin source, Validation messages - An unknown top-level or entry key is ignored and
claude plugin validatewarns. Documentation: Marketplace reference, Marketplace file - The characters of marketplace and plugin names, and the
<plugin>@<marketplace>form users type. Documentation: Marketplace reference, Top-level fields -
plugin.jsonwins over the entry forversion,claude plugin validatewarns, and the hosting page tells owners to setversionin one place. Documentation: Marketplace reference, Plugin entries, Host and maintain a marketplace, Release a new version
Read in the documentation on 2026-11-05.
-
claude plugin marketplace add <source>acceptsowner/repoand a path to a local directory, andclaude plugin install <plugin>@<marketplace>installs from a marketplace already added. Documentation: Plugin commands reference, plugin marketplace add, Install and manage plugins, Add a marketplace Seen: Claude Code 2.1.308, 2026-10-24,claude plugin marketplace add <checkout>, thenclaude plugin install model-router@model-router. Adding the checkout's path printedSuccessfully added marketplace: model-router (declared in user settings), and the install printedSuccessfully installed plugin: model-router@model-router (scope: user). -
claude plugin install <plugin> --marketplace <source>adds the marketplace first and then installs, the plugin name goes by itself, and the releases that need the shell form and the/plugin installform. Documentation: Install and manage plugins, Add a marketplace and install in one command -
claude plugin install --config <key>=<value>sets auserConfigoption at install time, and the scope defaults touser. Documentation: Plugin commands reference, plugin install -
claude plugin configure <name>@<marketplace> --values-stdinsaves option values from a JSON object on standard input, needs the full plugin id, and the release that needs it. Documentation: Plugin commands reference, plugin configure - A plugin's version is read from
plugin.jsonfirst, then from the entry, and a new copy reaches users only when that version differs from the one they hold. Documentation: Plugin loading reference, How Claude Code computes the version, Host and maintain a marketplace, Release a new version - A marketplace plugin is copied into
cache/<marketplace>/<plugin>/<version>/and loaded from there, and a relative-path plugin in a marketplace added from a local path loads in place. Documentation: Plugin loading reference, In-place and copied plugins - Background auto-update is off for a third-party marketplace until a user or an administrator turns it on, and
claude plugin update <plugin>@<marketplace>updates by hand. Documentation: Install and manage plugins, Keep plugins updated, Host and maintain a marketplace, Turn on auto-update
Read in the documentation on 2026-11-05.
- A mod is a plugin whose
hooks/hooks.jsonhas amoduleskey that holds an array with one path, relative to that file. Documentation: Mods reference, Files - The hooks module is an ES module that exports
register(on, options);optionsholds theuserConfigvalues with their defaults filled in; when the list that the manifest'soptionskey gives for an option does not hold the option's stored value, theoptionsargument ofregistercarries the default and not the stored value; the stored value stays underpluginConfigs. Documentation: Mods reference, Files Seen: Claude Code 2.1.318 on 2026-11-21,claude plugin install <plugin>@<marketplace> --config provider=auto, aclaude plugin updateto a version whose list lacks the value, thenclaude -p --output-format stream-json --verbose --debug-file <log>. The module got the manifest default for the value and for an option never set, and the stored value stayed inpluginConfigs; one stored value and one list change were tested. -
.jsand.tsfiles load directly with no build step, a hooks module imports only files inside the plugin directory by relative path, and the one bare import allowed isclaude-code. Documentation: Create a mod, Check what Claude Code reads from your mod -
$.ui.asktakes at most four options. Seen: Claude Code 2.1.318 on 2026-11-20,claude plugin test plugins/model-routerwith a dialog of five options. The call is refused with$.ui.ask takes at most 4 options (got 5). - A free string option that a manifest declares again hands its stored string to the plugin.
Source: the published package
@anthropic-ai/claude-code, bundled code of 2.1.318, read on 2026-11-25. For an option with nooptionslist, the loader hands the stored string on as stored. - A
config.describehook returns{ label, description, isHidden }for each/configrow, keyed<plugin>.<field>, and a hidden row still answers$.config.set. Source:claude-code.d.tsL2540–L2573, L6181–L6190, L2614–L2619. The first gives the row'slabel,descriptionandisHidden, and says in lines 2559–2561 that a hidden row still answers$.config.set. The second is the hook's own text. The third gives the key form<plugin>.<field>for a plugin'suserConfigfield. -
$.config.setrejects a key with no/configrow, an undeclared key included, with<plugin>: $.config.set: no /config row with key <key> ($.config.list names them). Source: the published package@anthropic-ai/claude-code, bundled code of 2.1.318, read on 2026-11-25. The/configrows,$.config.list, theconfig.describeevent and$.config.setall use one row list, built from the manifest'suserConfig.$.config.setthrows for a key with no row. - No
config.describeevent fires for a key that the manifest does not declare. Source: the published package@anthropic-ai/claude-code, bundled code of 2.1.318, read on 2026-11-25. Theconfig.describeevent uses the one row list that the item above names, and a key outside the manifest has no row in it. - A failing hooks module is skipped and the session continues, so a broken mod can look like one that does nothing. Documentation: Troubleshoot a mod
- A marketplace mod loads at the next start of Claude Code or at
/reload-pluginsin an open session. Documentation: Mods overview, Install or update a mod - When
$.config.setwrites an option of a mod in an open session, Claude Code reloads the mod's hooks module at once and runs itssession.starthook again. Seen: Claude Code 2.1.318 on 2026-11-22, an interactive session with--plugin-dirand--debug-file <log>. After each of four writes the log heldhooks module model-router@inline reloaded in <n>ms, the lineoptions changed — reloaded (7 hooks: …)and a settledsession.start; a command typed after the reloads printed the written values. - A running hooks-module call that writes twice with
$.config.setcompletes its second write after the reload that its first write caused; both writes land, and the call returns its result after the second reload. Seen: Claude Code 2.1.318 on 2026-11-25, an interactive session with--plugin-dirand--debug-file <log>, one tool call of the mod that wrote one option and then cleared another. The log held the first atomic write of the settings file,hooks module model-router@inline reloaded, the second atomic write, a second reload, and then the tool call resolved with its result; the settings file held both values. - An option cleared with
$.config.setto an empty text stays underpluginConfigsas an empty string, not as a deleted key. Seen: Claude Code 2.1.318 on 2026-11-25, the same run. After the call the cleared option's key was present inpluginConfigswith the value"". - A command typed at the prompt of an interactive session reaches
command.runwith the origin kindcomposer, and a command given as the prompt ofclaude -preaches it with another origin. Seen: Claude Code 2.1.318 on 2026-11-21 and 2026-11-22. A hook that writes only for the kindcomposerwrote for the typed command and printed the current value, writing nothing, for the same command underclaude -p; the run does not show the kind print mode gives. - In print mode, a turn that ends in a sign-in error exits with status 1, and it has loaded the hooks module and run its
session.starthook. Seen: Claude Code 2.1.318 on 2026-11-21,claude -p --output-format stream-json --verbose --debug-file <log>. Both turns exited 1 with a sign-in error, and each debug log held the module's load and its settledsession.starthook; the run does not show the order of the hook against the sign-in check. - An installed plugin is cached by version, and an edit reaches the installed copy only after the version rises and the user installs again. Documentation: Create a mod, Share your mod
- A
tool.describehook with a{ tool: "<name>" }matcher gets the tool, its description, an optional deferral flag and the provider, and answers a description and an optional deferral flag; the engine refuses a hook that passes on a changedtoolorprovider; and it caches the answer by tool name until$.ui.invalidate. Read on 2026-11-26. Source: Claude Code 2.1.296, the type declarations that Claude Code writes into a plugin's.claude-plugin/types/claude-code/index.d.ts:ToolDescribeInputlines 12917–12944,ToolDescribeResultlines 12954–12957, the matcher example lines 4228–4230 and the cache rule lines 4223–4225. Closed source, so no link. Source: Claude Code 2.1.308, the strings of theclaudebinary in the npm package@anthropic-ai/claude-code-darwin-arm64@2.1.308; the argument check of thetool.describeevent refuses a changed tool, because the engine caches the description by it, and a changed provider. The 2.1.308 wrapper package@anthropic-ai/claude-codeholds no declarations. Closed source, so no link. - The model sees the answer of a
tool.describehook as the tool's description, in the main session and in a subagent that has the tool. Seen: Claude Code 2.1.332 on 2026-11-26,claude -p --plugin-dir <plugin> --setting-sources project --model haiku --max-turns 4. The main agent quoted the added text word for word as the last three sentences of theAgentdescription, and ageneral-purposesubagent named theAgenttool among its tools and quoted the first sentence of the text from that tool's description.
Read at Claude Code 2.1.308 and 2.1.318, and in the documentation on 2026-11-11.
-
agent.spawnfires when a subagent or a teammate is about to start and when a finished or stopped subagent is about to run again,e.resumeis{ agentId }for a resumed run, a changed event passed tonextis ignored there, and the release from which the resumed run raises the event. Documentation: Mods reference, Subagents -
SendMessageresumes a completed subagent under the same ID with no new Agent call, Explore and Plan return no agent ID, a per-invocationmodelandeffortstay in effect on the resumed run, andCLAUDE_CODE_EFFORT_LEVELoutranks the effort. Documentation: Create custom subagents, Resume subagents, Choose an effort level - A model set at
agent.spawnstays on the resumed run. Seen: Claude Code 2.1.318, 2026-11-11,claude -p --model sonnet --output-format stream-json --verbosewith the plugin loaded by--plugin-dir, onegeneral-purposeAgent call, then oneSendMessageto its agent id. The debug log held one routing line for the two runs. The subagent's messages carriedmessage.modelclaude-haiku-5-5on its first run and on the resumed run, and the session's own messages carriedclaude-sonnet-5-5. -
turn.completecarries a subagent'sagentIdonce for each run of its loop, and no event marks a subagent as gone: a completed, failed or stopped agent can still resume under its id. Documentation: the declarations Claude Code 2.1.308 writes beside a loaded mod,TurnCompleteFields.agentIdandAgentStatus -
turn.stepcarries theagentId, and a hook may rewrite itseffort. Documentation: React to events, Follow a turn; the declarations Claude Code 2.1.308 writes beside a loaded mod,TurnStepInput.effort - The other fields of
agent.spawn(provider,parentModel,parentAgentId,permissionMode,background,cwd) andagent.offer(provider). Documentation:claude-code.d.tsL203 and L259–L309, written by Claude Code 2.1.277; the declarations Claude Code 2.1.308 writes hold the same fields
Read in the documentation on 2026-11-05.
-
claude plugin validate <path>takes a manifest file or a directory, a directory with.claude-plugin/marketplace.jsonvalidates the marketplace, and the release from which a directory with both files validates the marketplace and then the plugin. Documentation: Plugin commands reference, Validate a directory -
--stricttreats warnings as errors, and the command then exits1. Documentation: Plugin commands reference, plugin validate - A validation run does not check a
SKILL.mdat the plugin root. Documentation: Plugin commands reference, Validate a directory - For a mod, validation prints
hooks:andcalls:lines that list the events and the API calls found in the module, prints a line for each hook that can refuse an action, with or without a.catchhandler, and notes that its checks apply none of the plugin directory's own rules for hooks modules. Documentation: Create a mod, Check what Claude Code reads from your mod Seen: Claude Code 2.1.308, 2026-11-04,claude plugin validate --strict plugins/model-routeron Ubuntu and macOS. It printed thehooks:andcalls:lines and✔ Validation passed, and it noted that its checks apply none of the plugin directory's own rules for hooks modules. -
claude plugin test [directory]runs every file under the directory whose name ends in.test.tsor.test.tsx, needs no session, sign-in or network, and exits1when a test fails. Documentation: Plugin commands reference, plugin test Seen: Claude Code 2.1.308, 2026-11-04,claude plugin test plugins/model-routeron Ubuntu. It ran the plugin's test files with no session and passed. - Under
claude plugin test, a$.ui.askdialog given one option holds that option followed byYes. Two or more options arrive as given. The type declarations Claude Code writes for a plugin say of$.ui.askthat fewer than two options are padded with Yes/No. Read in the type declarations of Claude Code 2.1.318 (AskOptions.options: "2-4 option labels; fewer than two are padded with Yes/No") on 2026-11-21. Seen: Claude Code 2.1.318,claude plugin test plugins/model-router, 2026-11-21: a plugin dialog with one option (provider) reached thetool.callhook ofAskUserQuestionwith two options, the plugin's option andYes; dialogs with two (scope) and four (gateway) options arrived as given; a test answer ofYesto the one-option dialog was not one of the plugin's offered values, so the plugin reported the setting unchanged
Read in the documentation on 2026-11-05.
- When a plugin is copied into the cache, its Node.js dependencies install there only when the plugin root holds both a
package.jsonand a supported lockfile. Documentation: Plugin loading reference, Node.js package dependencies - The dependency install runs no lifecycle scripts, times out after 60 seconds and cannot be turned off. Documentation: Plugin loading reference, Limits on the dependency install
- A relative
sourcesuch as./plugins/formatterresolves to<marketplace root>/plugins/formatter, though the catalogue sits in.claude-plugin/. Documentation: Marketplace reference, Relative path plugin source
Read in the documentation on 2026-11-19.
- Project skills load from
.claude/skills/in the folder Claude Code starts in and in each parent up to the repository root. Documentation: Extend Claude with skills -
CLAUDE_CONFIG_DIRreplaces the configuration folder~/.claude, which holds the settings, the session history and the plugins. Documentation: Environment variables - A model turn under
CLAUDE_CONFIG_DIRset to a copy of the configuration folder ends in a sign-in error. Seen: Claude Code 2.1.318 on 2026-11-21 and Claude Code 2.1.332 on 2026-11-26,CLAUDE_CONFIG_DIR=<copy> claude -p "<prompt>" --model haiku --output-format stream-json --verbose --debug-file <log>. Each turn ended in a sign-in error; on 2.1.332 it readNot logged in · Please run /login. -
--setting-sourcesloads only the sources it names,projectleaves the user settings out, and a model turn under the real configuration folder with that flag is signed in. Documentation: CLI reference, CLI flags, read on 2026-11-26 Seen: Claude Code 2.1.332 on 2026-11-26,claude -p "<prompt>" --plugin-dir <plugin> --setting-sources project --strict-mcp-config --model haiku --max-turns 4 --output-format stream-json --verbose --debug-file <log>, started from an empty folder with noCLAUDE_CONFIG_DIR. The turn was signed in, called a subagent and ended with"is_error":false. -
--strict-mcp-configskips the MCP servers of.mcp.json,~/.claude.jsonand plugins, and loads those of--mcp-config. Documentation: CLI reference, CLI flags, read on 2026-11-26 -
--debug-file <path>writes the debug log to that path and turns debug mode on, and without it the debug log is~/.claude/debug/<session-id>.txt. Documentation: CLI reference, CLI flags, Environment variables
Read in the documentation on 2026-11-05.
- The Mods reference gives no rule for the declaration form of
registerin a hooks module, for freesetTimeoutglobals or for a size limit on the module. Documentation: Mods reference - No run has shown the effort of a resumed request: the stream carries no request's effort.
- A run under
--model haikucould not show whether a routed model stays on a resumed run: the plugin routed the same task tohaiku. - No run has shown whether an
optionslist may hold six values, or whether auserConfigstring with nooptionslist reaches the hooks module as stored.