Error reference changederrors
Nearest release: v2.1.284, published 23 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 29 Sep 2026 16:35 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 29 Sep 2026 16:37 UTC.
Upstream edited
Recorded here
Lines+11added
Lines−7removed
From line
174
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits114to this page, all time
### Conflict between --bg and --print ### The --json-schema value is not a valid JSON Schema
The whole hunk
from line 174, old and new numbered
/
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
from line 174
174174| `Installation was killed before it could finish (exit code 137)` | [Installation errors](#installation-was-killed-before-it-could-finish) |
175175| `The connection dropped while downloading the update` | [Installation errors](#the-connection-dropped-while-downloading-the-update) |
176176| `Download timed out: exceeded the total deadline` | [Installation errors](#the-connection-dropped-while-downloading-the-update) |
177| `--bg and --print conflict` | [Command-line errors](#command-line-errors) |
177| `--bg and --print conflict` | [Command-line errors](#conflict-between-bg-and-print) |
178178| `Cloud sessions cannot be created from a --restricted session` | [Command-line errors](#cloud-sessions-cannot-be-created-from-a-restricted-session) |
179179| `Cloud sessions are disabled by your organization's policy` | [Command-line errors](#cloud-sessions-are-disabled-by-your-organizations-policy) |
180180| `Couldn't verify your organization's policy for cloud sessions` | [Command-line errors](#cloud-sessions-are-disabled-by-your-organizations-policy) |
181| `Error: --json-schema is not a valid JSON Schema` | [Command-line errors](#command-line-errors) |
181| `Error: --json-schema is not a valid JSON Schema` | [Command-line errors](#the-json-schema-value-is-not-a-valid-json-schema) |
182182| `Error: Invalid --agents configuration:` | [Command-line errors](#invalid-agents-configuration) |
183183| `Error: --agents takes a JSON object, or a file path only with --print (-p)` | [Command-line errors](#invalid-agents-configuration) |
184184| `Error: --agents file not found` | [Command-line errors](#invalid-agents-configuration) |
from line 2554
25542554
25552555These errors come from the `claude` command line and its subcommands, from a command name you submit at the prompt, and from commands such as `/security-review` that gather context by running shell commands before their prompt runs. They also come from `/tui`, which relaunches the CLI.
25562556
2557### Conflict between --bg and --print
2557<h3 id="conflict-between-bg-and-print">
2558 Conflict between `--bg` and `--print`
2559</h3>
25582560
25592561This message requires Claude Code v2.1.198 or later. You combined `--bg` with `-p` or `--print` in the same `claude` invocation. `--bg` starts a [background session](/docs/en/agent-view#from-your-shell) that you later attach to with `claude agents`, while `--print` runs [non-interactively](/docs/en/headless) and never starts the interactive session that `claude agents` attaches to. Before v2.1.198 this combination silently created a background job that could never be attached to.
25602562
from line 2570
25682570* To run the prompt non-interactively and print the result instead of creating a background session, drop `--bg` and run `claude -p "<task>"`
25692571
25702572<h3 id="invalid-agents-configuration">
2571 Invalid --agents configuration
2573 Invalid `--agents` configuration
25722574</h3>
25732575
25742576The value you passed to `--agents` is invalid, so `claude` exits with code 1 instead of starting the session. When you pass `--safe-mode` or set [`CLAUDE_CODE_SAFE_MODE`](/docs/en/env-vars#variables), Claude Code ignores `--agents` entirely. With `--resume` or `--continue`, an inline JSON value isn't checked and the session starts; a value read from a file is checked on every launch. Before v2.1.242, Claude Code started the session anyway.
from line 2598
25962598* Fix each problem the message lists, then run the command again. See [the fields a CLI-defined subagent takes](/docs/en/sub-agents#choose-the-subagent-scope).
25972599
25982600<h3 id="cloud-sessions-cannot-be-created-from-a-restricted-session">
2599 Cloud sessions cannot be created from a --restricted session
2601 Cloud sessions cannot be created from a `--restricted` session
26002602</h3>
26012603
26022604When you start a session with [`--restricted`](/docs/en/cli-reference#cli-flags), Claude Code refuses to create [cloud sessions](/docs/en/claude-code-on-the-web#from-terminal-to-cloud) from it, because the new session would run outside the restricted process and wouldn't enforce restricted mode. Claude Code refuses on the client, before contacting the server, so no cloud session is created:
from line 2635
26332635* Ask an [Owner](/docs/en/server-managed-settings#access-control) in your organization to enable cloud sessions in the Claude Code admin settings at [claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code)
26342636* If the message says it couldn't verify the policy, check your network connection, then restart Claude Code and try again
26352637
2636### The --json-schema value is not a valid JSON Schema
2638<h3 id="the-json-schema-value-is-not-a-valid-json-schema">
2639 The `--json-schema` value is not a valid JSON Schema
2640</h3>
26372641
26382642The schema you passed to [`--json-schema`](/docs/en/cli-reference#cli-flags) in [non-interactive mode](/docs/en/headless#get-structured-output) failed JSON Schema compilation, so `claude` exits with code 1 instead of running the prompt. Before v2.1.205, an invalid schema produced unstructured output with no error, and any schema that used the `format` keyword was treated as invalid.
26392643
from line 2851
28472851
28482852**What to do:**
28492853
2850* Check what sits at `.mcp.json` in your current directory. Replace it with an ordinary JSON file in the [project-scope format](/docs/en/mcp#project-scope), or delete it, then run the command again.
2851
2852<h3 id="anthropic-hos
2854* Check what sits at `.mcp.json` in your current directory. Repla
No line in this hunk matches that.