feat(claude): warm up sessions for agents that expose MCPs

`ClaudeCodeOptions.warmup_turn` defaults to `None`, which decides per
agent: on when the agent exposes any MCP, off otherwise. An agent whose
tools are the point shouldn't answer its first message without them, and
an agent with no MCPs shouldn't pay for a warm-up it gains nothing from.

The underlying reason lives in claude-code-api: the CLI connects MCP
servers when a turn starts and doesn't await them, so turn one runs with
built-in tools only.
This commit is contained in:
hh
2026-07-28 03:22:39 +02:00
parent 7f633a11a2
commit 6c1780583c
3 changed files with 27 additions and 2 deletions
Generated
+2 -2
View File
@@ -287,7 +287,7 @@ local = [
{ name = "raycast-api", version = "0.1.0", source = { editable = "../raycast-api" } },
]
prod = [
{ name = "claude-code-api", version = "0.1.0", source = { git = "https://git.kotikot.com/beaver/claude-code-api.git#b50911c3edb62e30597b6b96739b888c8be853fe" } },
{ name = "claude-code-api", version = "0.1.0", source = { git = "https://git.kotikot.com/beaver/claude-code-api.git#621da90623279949fbe47b80bfa57a7c8c6bf74b" } },
{ name = "raycast-api", version = "0.1.0", source = { git = "https://git.kotikot.com/beaver/raycast-api.git#e73894c8e435da5c0709f92f69f11bcd0dab9afe" } },
]
@@ -419,7 +419,7 @@ wheels = [
[[package]]
name = "claude-code-api"
version = "0.1.0"
source = { git = "https://git.kotikot.com/beaver/claude-code-api.git#b50911c3edb62e30597b6b96739b888c8be853fe" }
source = { git = "https://git.kotikot.com/beaver/claude-code-api.git#621da90623279949fbe47b80bfa57a7c8c6bf74b" }
resolution-markers = [
"python_full_version >= '3.14'",
"python_full_version < '3.14'",