Error reference changederrors
Nearest release: v2.1.309, published 2 hours after 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 22 Oct 2026 17:34 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 22 Oct 2026 17:37 UTC.
Upstream edited
Recorded here
Lines+22added
Lines−0removed
From line
140
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits193to this page, all time
### MCP server connection timed out during a sleep or clock change
The whole hunk
from line 140, 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 140
140140| `N sessions ended while this machine was offline — the environment was cleaned up on the server and can't be resumed.` | [Network](#sessions-ended-while-this-machine-was-offline) |
141141| `Couldn't share the transcript.` | [Network](#couldnt-share-the-transcript) |
142142| `Couldn't send feedback` | [Network](#couldnt-send-feedback) |
143| `MCP server "<name>" connection timed out. Your computer went to sleep or its clock changed while connecting.` | [Network](#mcp-server-connection-timed-out-during-a-sleep-or-clock-change) |
143144| `Prompt is too long` / `Input is too long for requested model` | [Request errors](#prompt-is-too-long) |
144145| `Prompt is too long · automatic compaction failed:` | [Request errors](#prompt-is-too-long) |
145146| `Prompt is too long · this conversation is a single exchange` / `A single-exchange conversation cannot be compacted` | [Request errors](#prompt-is-too-long) |
from line 2139
21382139
21392140Before v2.1.281, every send failed with this message once a Remote Control **Stop** or an urgent cross-session message had arrived while the dialog was open. On those versions, close the dialog, reopen it, and send again.
21402141
2142### MCP server connection timed out during a sleep or clock change
2143
2144This message means a connection to an [MCP server](/docs/en/mcp) timed out, and Claude Code found that your system clock jumped forward during the attempt:
2145
2146```text theme={null}
2147MCP server "<name>" connection timed out. Your computer went to sleep or its clock changed while connecting.
2148```
2149
2150Claude Code can't tell whether your computer slept or its clock was set forward, so the message names both.
2151
2152**What to do:**
2153
2154Connect to the server again, and keep your computer awake until the attempt finishes. If the server connects, you have nothing to fix.
2155
2156* **In an interactive session**: run `/mcp`, select the server, and select **Reconnect**
2157* **In your shell**: run the [`claude -p`](/docs/en/headless), [`claude mcp list`](/docs/en/mcp#managing-your-servers), or `claude mcp get` command again. If the server then fails with a message that starts `Skipping connection (recent failure cached`, wait 15 minutes and run the command again.
2158* **In an [Agent SDK](/docs/en/agent-sdk/overview) application**: call [`reconnectMcpServer()`](/docs/en/agent-sdk/typescript#methods) in TypeScript or [`ClaudeSDKClient.reconnect_mcp_server()`](/docs/en/agent-sdk/python#methods) in Python
2159* **If the server fails again**: if the message differs from this one, see [what to check when an MCP server doesn't connect](/docs/en/mcp-quickstart#troubleshooting). If this message comes back although your computer stayed awake and nothing changed its clock, see [Report an error](#report-an-error).
2160
2161Before v2.1.307, Claude Code showed a timeout message such as `MCP server "<name>" connection timed out after <N>ms` instead of this one.
2162
21412163## Request errors
21422164
21432165These errors relate to the content of your request. Most come back from the API after it rejected the request; a few are produced locally by Claude Code before any request is sent.
from line 2627
26052627A [PreModelSwitch hook](/docs/en/hooks#premodelswitch) didn't approve the model switch you or a client requested, so the session keeps its current model. When the switch came from an [Agent SDK](/docs/en/agent-sdk/overview) host or [Remote Control](/docs/en/remote-control) rather than a command you typed, the message reads `Model switch blocked by a PreModelSwitch hook` without naming the target model.
26062628
26072629```text theme={null}
2608Model switch to Opus 4.6 was blocked by a PreModelSwitch hook: Opus 4.6 is retired for this project. Use a newer model.
2609```
2610
2611The reason after the colon says what refused the switch:
2612
2613* **A reason a hook wrote**: a PreModelSwitch hook supplied that reason when it [denied the switch or asked for confirmation](/docs/en/hooks#premodelswitch-decision-control). Address what it asks, or pick a model your hooks allow.
2614* **`PreModelSwitch hook <name> did not respond before its timeout`**: a hook that doesn't answer before its [timeout](/docs/en/hooks#timeouts) blocks the switch. Fix the hanging command or raise that hook's `timeout`, then switch again.
2615* **`confirmation required, and this session cannot ask`**: a hook answered `ask` without a reason, and a control request has no way to show the confirmation prompt. A `/model` command in a [`-p` run](/docs/en/headless) reports the same condition with `(run /model interactively to confirm)` after the reason. Make the switch from an interactive session, or change the hook's decision for this model.
2616* **`so organization-managed PreModelSwitch hooks could not be checked`**: Claude Code couldn't tell which PreModelSwitch hooks your organization's [managed plugins](/docs/en/settings-reference#enabledplugins) deliver, for example because a managed plugin failed to load. One of those hooks might block the switch, so Claude Code refuses rather than apply the switch unchecked. The start of the reason names what failed. Claude Code re-checks on every switch attempt, so a failure that has since cleared stops blocking; if it keeps failing, run `claude --debug` and switch again to capture the details, then fix the plugin or ask your admin to fix it.
2617* **`a PreModelSwitch hook failed before answering`** or **`PreModelSwitch hooks were cancelled (the control stream closed) before answering`**: the hook run ended without a verdict, and Cl
2630Model switch
No line in this hunk matches that.