Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(server): disable session prewarming by default

alan_cheng5fa710897f15
diff --git a/.doc_project_maintainer/INDEX.md b/.doc_project_maintainer/INDEX.md
index 4b49d9428b..e99e0bef77 100644
--- a/.doc_project_maintainer/INDEX.md
+++ b/.doc_project_maintainer/INDEX.md
@@ -39,6 +39,7 @@ Status: partial. A 2026-07-15 semantic-hash scan at `10afedf2` found 0 expired a
- [ADR-0001](decisions/ADR-0001-agentserver-owned-prewarmed-sessions.md): AgentServer owns prewarmed session identity.
- [CHG-20260731-001](changes/records/CHG-20260731-001-session-prewarm-allocation.md): session allocation and DeepAgent prewarming.
- [CHG-20260801-001](changes/records/CHG-20260801-001-prewarm-foreground-priority.md): foreground chat priority, lazy background warming, and non-blocking runtime probes.
+- [CHG-20260801-005](changes/records/CHG-20260801-005-disable-session-prewarm.md): prewarming off by default behind `JIUWENSWARM_AGENT_PREWARM`.
## Priority Code Symbols
diff --git a/.doc_project_maintainer/changes/records/CHG-20260801-005-disable-session-prewarm.md b/.doc_project_maintainer/changes/records/CHG-20260801-005-disable-session-prewarm.md
new file mode 100644
index 0000000000..11962a3064
--- /dev/null
+++ b/.doc_project_maintainer/changes/records/CHG-20260801-005-disable-session-prewarm.md
@@ -0,0 +1,31 @@
+---
+id: CHG-20260801-005
+date: 2026-08-01
+title: Switch background session prewarming off by default
+confidence: confirmed
+modules:
+ - agentserver-runtime
+flows:
+ - session-prewarm-allocation
+decisions:
+ - ADR-0001
+---
+
+# Switch Background Session Prewarming Off By Default
+
+## Change
+
+`AgentWarmPool` gained an `enabled` switch that defaults to the `JIUWENSWARM_AGENT_PREWARM` environment variable and is off unless it is set to `1`/`true`/`yes`/`on`.
+
+While off, `sync` (and therefore `refresh`) returns zero statistics without advancing the revision, scheduling preparation, or writing markers, and `claim` returns a freshly allocated ID with `prewarm_hit=false` and `prewarm_status="bypassed"` — the path Team/Swarm creation already used. No agent is created and no `prepare_session` runs before the first request; sessions initialize lazily on `chat.send` as they did before CHG-20260731-001.
+
+AgentServer-owned ID allocation, `create_token` idempotency, `session.create` validation, and the Gateway `agent.prewarm.sync` RPC are unchanged; the RPC simply becomes a zero-stat no-op.
+
+## Compatibility
+
+No wire or call-site change. `prewarm_status` is always `bypassed` and `prewarm_hit` always `false` while the switch is off. Setting `JIUWENSWARM_AGENT_PREWARM=1` restores the CHG-20260731-001 behavior.
+
+## Verification
+
+- `tests/unit_tests/agentserver/test_agent_warm_pool.py`: added a default-off case asserting zero stats, a bypassed claim, and no slots/tasks/preparation; the existing pool cases opt in explicitly. One pre-existing macOS-only failure remains in `test_warm_key_normalizes_project_directory`, where the test lowercases a path that `os.path.normcase` leaves untouched on POSIX.
+- Session allocation contract suites for AgentServer ACP/plan mode, Web identity, project binding, TUI forwarding/KVC ownership, and the Cron scheduler: 201 passed.
diff --git a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.claim.md b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.claim.md
index 585f9ee817..f699132469 100644
--- a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.claim.md
+++ b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.claim.md
@@ -11,4 +11,4 @@ audit:
## Actual Role
-Atomically removes a READY slot, promotes a matching warming task with its existing Session ID, or creates one claimed-session initialization task on the foreground lane. READY/promoted claims retain the root pin until the first AgentServer request, prioritize their key for replenishment, and do not start new speculative work during active chat.
+Returns a freshly allocated `bypassed` claim when the pool is disabled or the key is Swarm. Otherwise atomically removes a READY slot, promotes a matching warming task with its existing Session ID, or creates one claimed-session initialization task on the foreground lane. READY/promoted claims retain the root pin until the first AgentServer request, prioritize their key for replenishment, and do not start new speculative work during active chat.
diff --git a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.sync.md b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.sync.md
index 70369d0181..85c46b8019 100644
--- a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.sync.md
+++ b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/AgentWarmPool.sync.md
@@ -11,4 +11,4 @@ audit:
## Actual Role
-Filters ineligible channels, discovers visible/default projects off the AgentServer event loop, advances the config fingerprint revision, and reconciles an immutable target snapshot. Missing targets remain pending while only the bounded next background batch is started; the method returns statistics without waiting for initialization.
+Returns zero statistics without touching revision or slot state while the pool is disabled. Otherwise filters ineligible channels, discovers visible/default projects off the AgentServer event loop, advances the config fingerprint revision, and reconciles an immutable target snapshot. Missing targets remain pending while only the bounded next background batch is started; the method returns statistics without waiting for initialization.
diff --git a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/Class AgentWarmPool.md b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/Class AgentWarmPool.md
index 92fbbecfe6..173f9d45f6 100644
--- a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/Class AgentWarmPool.md
+++ b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/Class AgentWarmPool/Class AgentWarmPool.md
@@ -19,6 +19,7 @@ Maintains at most one speculative READY or warming session globally across eligi
## Key Contracts
+- The pool is inert unless `enabled` (default: the `JIUWENSWARM_AGENT_PREWARM` environment variable) opts in.
- Only single-Agent keys enter READY.
- Code keys acquire AgentManager roots with `mode=code, sub_mode=normal`; work keys use `mode=agent, sub_mode=None`.
- A claim is atomic; matching warming work retains its Session ID, and the claimed key is prioritized for replenishment after foreground chat.
diff --git a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/agent_warm_pool.py.md b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/agent_warm_pool.py.md
index a316660ccd..e15af78564 100644
--- a/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/agent_warm_pool.py.md
+++ b/.doc_project_maintainer/code/jiuwenswarm/server/runtime/agent_warm_pool.py/agent_warm_pool.py.md
@@ -11,7 +11,7 @@ last_updated: 2026-08-01
## Actual Role
-Owns process-local reconciliation and atomic claiming of session-bound READY DeepAgents. It defines immutable warm identity/revision records, guarded marker cleanup, bounded background initialization, stale revision disposal, claimed-session waiting, and root-agent pinning.
+Owns process-local reconciliation and atomic claiming of session-bound READY DeepAgents. It defines immutable warm identity/revision records, guarded marker cleanup, bounded background initialization, stale revision disposal, claimed-session waiting, and root-agent pinning. All of that stays dormant behind the `JIUWENSWARM_AGENT_PREWARM` opt-in switch, which is off by default.
## Symbol Inventory
diff --git a/.doc_project_maintainer/manifest.yaml b/.doc_project_maintainer/manifest.yaml
index ad97b7a2a6..3dd4c5b377 100644
--- a/.doc_project_maintainer/manifest.yaml
+++ b/.doc_project_maintainer/manifest.yaml
@@ -292,7 +292,7 @@ flows:
- AgentWebSocketServer._handle_history_get_stream
- id: session-prewarm-allocation
name: Session Prewarm And Allocation
- summary: Gateway syncs live channels; AgentServer prepares, claims, and replenishes session-bound single-Agent runtimes.
+ summary: Gateway syncs live channels; AgentServer prepares, claims, and replenishes session-bound single-Agent runtimes. Prewarming itself is off unless JIUWENSWARM_AGENT_PREWARM opts in.
confidence: confirmed
doc: project/flows/session-prewarm-allocation.md
modules:
@@ -416,6 +416,9 @@ changes:
- id: CHG-20260801-001
title: Prioritize foreground chat over background prewarming
doc: changes/records/CHG-20260801-001-prewarm-foreground-priority.md
+- id: CHG-20260801-005
+ title: Switch background session prewarming off by default
+ doc: changes/records/CHG-20260801-005-disable-session-prewarm.md
code_symbol_inventory:
generated_by: scripts/inventory_symbols.py
source_symbol_inventory: project/source-symbol-inventory.json
diff --git a/.doc_project_maintainer/modules/agentserver-runtime/changes.md b/.doc_project_maintainer/modules/agentserver-runtime/changes.md
index e071a2ec88..2cc2055255 100644
--- a/.doc_project_maintainer/modules/agentserver-runtime/changes.md
+++ b/.doc_project_maintainer/modules/agentserver-runtime/changes.md
@@ -2,3 +2,4 @@
- [CHG-20260713-001: Close AgentWebSocketServer method audit delivery](../../changes/records/CHG-20260713-001-agentserver-method-closure.md) records the knowledge-model change that closed 128 method audits, refreshed the session flow, and added five AgentServer flows. It does not describe a product-code change.
- [CHG-20260731-001: AgentServer-owned session prewarming](../../changes/records/CHG-20260731-001-session-prewarm-allocation.md) adds session allocation, warm-pool reconciliation, and channel ownership changes.
+- [CHG-20260801-005: Prewarming off by default](../../changes/records/CHG-20260801-005-disable-session-prewarm.md) puts warm-pool reconciliation and claiming behind the `JIUWENSWARM_AGENT_PREWARM` opt-in, leaving allocation intact.
diff --git a/.doc_project_maintainer/project/flows/session-prewarm-allocation.md b/.doc_project_maintainer/project/flows/session-prewarm-allocation.md
index f94da88742..a4227e1457 100644
--- a/.doc_project_maintainer/project/flows/session-prewarm-allocation.md
+++ b/.doc_project_maintainer/project/flows/session-prewarm-allocation.md
@@ -40,7 +40,9 @@ entrypoints:
## Outcome
-AgentServer keeps at most one speculative, unclaimed READY or warming DeepAgent across all eligible single-Agent work/code keys. Single-Agent identity is canonical: work uses `agent:<empty>:<project>` and code uses `code:normal:<project>` in prewarm, metadata, and chat selection. ACP and A2A never enter the target set. A warm hit avoids `create_instance` and `start_interaction` on the first `chat.send`.
+Prewarming is off unless `JIUWENSWARM_AGENT_PREWARM` is set to `1`/`true`/`yes`/`on`. While off, `sync` reports zero statistics and never schedules preparation, and every claim returns a freshly allocated ID with `prewarm_status="bypassed"`; the session initializes lazily on its first request. Allocation, `create_token` idempotency, and `session.create` validation stay in force, so the rest of this flow is unchanged and only its warm path is dormant.
+
+When opted in, AgentServer keeps at most one speculative, unclaimed READY or warming DeepAgent across all eligible single-Agent work/code keys. Single-Agent identity is canonical: work uses `agent:<empty>:<project>` and code uses `code:normal:<project>` in prewarm, metadata, and chat selection. ACP and A2A never enter the target set. A warm hit avoids `create_instance` and `start_interaction` on the first `chat.send`.
Team, `code.team`, and Swarm creation bypass the warm pool.
@@ -81,7 +83,7 @@ On startup, old-boot markers and unclaimed metadata-less directories are removed
## Verification
-- WarmPool/mode tests cover global capacity, promotion/cancellation, code `sub_mode=normal`, work-mode canonicalization, and identical prewarm/chat cache identity.
+- `tests/unit_tests/agentserver/test_agent_warm_pool.py` covers the default-off switch alongside global capacity, promotion/cancellation, code `sub_mode=normal`, work-mode canonicalization, and identical prewarm/chat cache identity.
- Adapter tests cover off-loop/coalesced runtime probes and per-workspace/config MemoryRail reindex singleflight.
- AgentServer send/reload/ACP/plan-mode and Gateway ACP suites cover foreground guards and allocation boundaries.
- The latest contention/cache-identity follow-up passed 179 focused tests. Earlier channel-contract runs passed 139 tests, and the full Windows unit run recorded 3,791 passed, 4 skipped, with 14 unrelated failures.
diff --git a/jiuwenswarm/agents/harness/common/rails/skill_retrieval_prompt_rail.py b/jiuwenswarm/agents/harness/common/rails/skill_retrieval_prompt_rail.py
index e4e51f5b08..c415414edb 100644
--- a/jiuwenswarm/agents/harness/common/rails/skill_retrieval_prompt_rail.py
+++ b/jiuwenswarm/agents/harness/common/rails/skill_retrieval_prompt_rail.py
@@ -9,6 +9,7 @@ from typing import Any, Callable
from openjiuwen.core.single_agent.rail.base import AgentCallbackContext
from openjiuwen.harness.prompts import PromptSection
from openjiuwen.harness.prompts.sections import SectionName
+from openjiuwen.harness.rails import SkillUseRail
from openjiuwen.harness.rails.base import DeepAgentRail
from jiuwenswarm.symphony.agent import (
@@ -24,10 +25,13 @@ _LEGACY_LIST_SKILL_TOOL_NAMES = frozenset({"list_skill", "list_skills"})
class SkillRetrievalPromptRail(DeepAgentRail):
"""Inject lightweight skill-tree retrieval guidance into the system prompt."""
- # openjiuwen's callback framework executes higher priorities first. Keep this
- # below SkillUseRail(100) so the native skills section can be hidden after it
- # is refreshed for the current model call.
- priority = 99
+ # openjiuwen's callback framework executes higher priorities first, and
+ # SkillUseRail rebuilds the native skills section on every model call. This
+ # rail must therefore run after it, or the section it hides is immediately
+ # re-added and the model sees both prompts. Derive the value instead of
+ # hardcoding it: openjiuwen has already moved SkillUseRail once (100 -> 95),
+ # and a stale constant silently reverses the order rather than failing.
+ priority = SkillUseRail.priority - 1
SECTION_NAME = "skill_retrieval"
SECTION_PRIORITY = 41
diff --git a/jiuwenswarm/server/agent_ws_server.py b/jiuwenswarm/server/agent_ws_server.py
index 028c15e00a..412cc35c93 100644
--- a/jiuwenswarm/server/agent_ws_server.py
+++ b/jiuwenswarm/server/agent_ws_server.py
@@ -16,6 +16,7 @@ from pathlib import Path
from typing import Any, ClassVar, Optional
from weakref import WeakValueDictionary
+from openjiuwen.core.common.logging import server_logger
from websockets.exceptions import ConnectionClosed as WebSocketConnectionClosed
from jiuwenswarm.agents.harness.common.auto_harness import AutoHarnessService, reset_harness_packages_state
@@ -113,7 +114,6 @@ from jiuwenswarm.agents.harness.code.prompt.plan_approval import (
)
from jiuwenswarm.common.schema.message import ReqMethod
from jiuwenswarm.common.log_preview import preview_text
-from openjiuwen.core.common.logging import server_logger
logger = logging.getLogger(__name__)
diff --git a/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py b/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py
index 90ebd87690..c9f9c79e74 100644
--- a/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py
+++ b/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py
@@ -4887,7 +4887,8 @@ class JiuWenSwarmDeepAdapter:
mark_stateless([tool])
register_tool(tool, None)
- def _register_agent_owned_tool(self, tool: Any, owner_id: str) -> None:
+ @staticmethod
+ def _register_agent_owned_tool(tool: Any, owner_id: str) -> None:
"""Register a tool instance owned exclusively by this adapter's agent.
``_get_tool_cards`` runs before ``create_deep_agent``, so there is no
diff --git a/jiuwenswarm/server/runtime/agent_warm_pool.py b/jiuwenswarm/server/runtime/agent_warm_pool.py
index 1dbb8431b3..81b0f422f2 100644
--- a/jiuwenswarm/server/runtime/agent_warm_pool.py
+++ b/jiuwenswarm/server/runtime/agent_warm_pool.py
@@ -29,6 +29,29 @@ if TYPE_CHECKING:
logger = logging.getLogger(__name__)
+# Background prewarming is opt-in. When it stays off, sessions are allocated an id
+# immediately and initialize lazily on their first request.
+_PREWARM_ENABLED_ENV_KEY = "JIUWENSWARM_AGENT_PREWARM"
+
+
+def _prewarm_enabled_by_env() -> bool:
+ """Return whether background session prewarming is switched on.
+
+ Returns:
+ True only when the environment explicitly opts in.
+ """
+ raw = str(os.environ.get(_PREWARM_ENABLED_ENV_KEY, "") or "").strip().lower()
+ return raw in ("1", "true", "yes", "on")
+
+
+def _zero_stats() -> dict[str, int]:
+ """Return the pool statistics reported when nothing is being warmed.
+
+ Returns:
+ A statistics mapping with every counter set to zero.
+ """
+ return {"target": 0, "ready": 0, "warming": 0, "failed": 0, "stale": 0}
+
def _normalize_project_dir(value: str | None) -> str:
raw = str(value or "").strip()
@@ -90,8 +113,10 @@ class AgentWarmPool:
max_ready_slots: int = 1,
max_foreground_concurrency: int = 8,
background_cooldown_seconds: float = 0.25,
+ enabled: bool | None = None,
) -> None:
self._manager = manager
+ self._enabled = _prewarm_enabled_by_env() if enabled is None else bool(enabled)
self._boot_id = uuid.uuid4().hex
self._sequence = 0
self._revision = WarmRevision(self._boot_id, "", 0)
@@ -264,6 +289,8 @@ class AgentWarmPool:
config: Any,
env: Any = None,
) -> dict[str, int]:
+ if not self._enabled:
+ return _zero_stats()
channels: set[str] = set()
for channel in enabled_channels:
normalized_channel = str(channel).strip().lower()
@@ -276,13 +303,7 @@ class AgentWarmPool:
desired = await asyncio.to_thread(self._desired_keys, channels)
async with self._lock:
if self._closed:
- return {
- "target": 0,
- "ready": 0,
- "warming": 0,
- "failed": 0,
- "stale": 0,
- }
+ return _zero_stats()
if revision.sequence < self._revision.sequence:
warming_tasks = set(self._tasks.values()) | set(
self._session_tasks.values()
@@ -594,7 +615,7 @@ class AgentWarmPool:
await self.end_foreground()
async def claim(self, key: WarmKey) -> WarmClaim:
- if key.is_swarm:
+ if not self._enabled or key.is_swarm:
return WarmClaim(self._new_session_id(key.channel_id), False, "bypassed")
async with self._lock:
if self._closed:
diff --git a/tests/system_tests/test_a2x_client_runtime.py b/tests/system_tests/test_a2x_client_runtime.py
index 22ee8808f8..9ab3ddaff7 100644
--- a/tests/system_tests/test_a2x_client_runtime.py
+++ b/tests/system_tests/test_a2x_client_runtime.py
@@ -139,6 +139,22 @@ def _mock_create_model(self, config: dict) -> MagicMock:
return fake_model
+class _FakeAbilityManager:
+ """Minimal stand-in for the DeepAgent ability manager the adapter registers into."""
+
+ def __init__(self) -> None:
+ self.cards: list = []
+
+ def list(self) -> list:
+ return list(self.cards)
+
+ def add(self, card) -> None:
+ self.cards.append(card)
+
+ def remove(self, name: str) -> None:
+ self.cards = [card for card in self.cards if getattr(card, "name", "") != name]
+
+
async def _create_adapter_and_run_chat(config_base: dict) -> SimpleNamespace:
"""Create adapter, run one chat turn via interaction attach/send_input path.
@@ -162,6 +178,9 @@ async def _create_adapter_and_run_chat(config_base: dict) -> SimpleNamespace:
attach_output=AsyncMock(return_value=_FakeInteractionStream()),
send_input=AsyncMock(),
goal_manager=None,
+ # A real DeepAgent always carries one, and the adapter registers its
+ # session-stable tools through it while preparing the turn.
+ ability_manager=_FakeAbilityManager(),
)
request, inputs = _make_request()
diff --git a/tests/unit_tests/agentserver/test_agent_warm_pool.py b/tests/unit_tests/agentserver/test_agent_warm_pool.py
index abd2f7f39b..87a81c78f9 100644
--- a/tests/unit_tests/agentserver/test_agent_warm_pool.py
+++ b/tests/unit_tests/agentserver/test_agent_warm_pool.py
@@ -82,11 +82,44 @@ def isolated_pool(monkeypatch, tmp_path: Path):
)
def factory(agent: _FakeRootAgent) -> AgentWarmPool:
- return AgentWarmPool(_FakeManager(agent), max_concurrency=4)
+ # Prewarming is off by default; these cases exercise the opted-in pool.
+ return AgentWarmPool(_FakeManager(agent), max_concurrency=4, enabled=True)
yield factory
+async def test_disabled_pool_never_warms_and_always_bypasses(
+ monkeypatch, tmp_path: Path
+) -> None:
+ monkeypatch.setattr(
+ "jiuwenswarm.server.runtime.agent_warm_pool.get_agent_sessions_dir",
+ lambda: tmp_path,
+ )
+ monkeypatch.delenv("JIUWENSWARM_AGENT_PREWARM", raising=False)
+ agent = _FakeRootAgent()
+ pool = AgentWarmPool(_FakeManager(agent))
+
+ stats = await pool.sync(["web"], config={"model": "a"})
+ assert stats == {"target": 0, "ready": 0, "warming": 0, "failed": 0, "stale": 0}
+
+ key = pool.make_key(
+ channel_id="web",
+ project_id="default",
+ project_dir="",
+ work_mode="work",
+ )
+ claim = await pool.claim(key)
+ assert claim.prewarm_hit is False
+ assert claim.prewarm_status == "bypassed"
+ assert claim.session_id.startswith("web_")
+ assert not pool._slots
+ assert not pool._tasks
+ assert agent.prepared == []
+ await pool.wait_for_session(claim.session_id)
+ await pool.close()
+
+
def test_warm_key_normalizes_project_directory(tmp_path: Path) -> None:
key = AgentWarmPool.make_key(
channel_id=" web ",
@@ -174,7 +207,7 @@ async def test_foreground_bypasses_background_and_pauses_lazy_dispatch(
lambda **_kwargs: [],
)
agent = _ControlledRootAgent()
- pool = AgentWarmPool(_FakeManager(agent), max_concurrency=1)
+ pool = AgentWarmPool(_FakeManager(agent), max_concurrency=1, enabled=True)
await pool.sync(["web"], config={"model": "a"})
await _wait_until(lambda: len(agent.started) == 1)
assert len(pool._tasks) == 1
@@ -219,7 +252,7 @@ async def test_claim_promotes_matching_background_task_without_duplicate_prepare
lambda **_kwargs: [],
)
agent = _ControlledRootAgent()
- pool = AgentWarmPool(_FakeManager(agent), max_concurrency=1)
+ pool = AgentWarmPool(_FakeManager(agent), max_concurrency=1, enabled=True)
await pool.sync(["web"], config={"model": "a"})
await _wait_until(lambda: len(agent.started) == 1)
background_id = agent.started[0]
diff --git a/tests/unit_tests/agentserver/test_deep_adapter_runtime_config_timing.py b/tests/unit_tests/agentserver/test_deep_adapter_runtime_config_timing.py
index cb594bd612..4960b3d98f 100644
--- a/tests/unit_tests/agentserver/test_deep_adapter_runtime_config_timing.py
+++ b/tests/unit_tests/agentserver/test_deep_adapter_runtime_config_timing.py
@@ -37,7 +37,7 @@ def _make_adapter(stages: list[str]) -> JiuWenSwarmDeepAdapter:
adapter = object.__new__(JiuWenSwarmDeepAdapter)
adapter._instance = object()
- async def _stages(runtime_config, stage_timer) -> None:
+ async def _stages(runtime_config, stage_timer, *, bind_request) -> None:
for stage in stages:
stage_timer.mark(stage)
@@ -115,7 +115,7 @@ async def test_failing_stage_still_reports_how_far_it_got(loggers) -> None:
server_log, module_log = loggers
adapter = _make_adapter([])
- async def _stages(runtime_config, stage_timer) -> None:
+ async def _stages(runtime_config, stage_timer, *, bind_request) -> None:
stage_timer.mark("cwd_seed")
stage_timer.mark("rail_setters")
raise ValueError("boom")
diff --git a/uv.lock b/uv.lock
index f25e0d45db..d1addba41f 100644
--- a/uv.lock
+++ b/uv.lock
@@ -2911,7 +2911,7 @@ wheels = [
[[package]]
name = "openjiuwen"
version = "0.1.16"
-source = { git = "https://gitcode.com/openJiuwen/agent-core.git?branch=develop#b28b4f3a6248f116a66c97c8a73f2b89432dd3f5" }
+source = { git = "https://gitcode.com/openJiuwen/agent-core.git?branch=develop#21f8beaebf159d8605f2291f887b05a821bbfd2b" }
dependencies = [
{ name = "aiofiles" },
{ name = "aiohttp" },