From 692f79452d56fd14c4aece225abe9784af5c0812 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 15 Apr 2026 23:11:10 +0800 Subject: [PATCH] fix(gateway): forward agent_name and is_bootstrap from context to configurable (#2242) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The frontend sends agent_name and is_bootstrap via the context field in run requests, but services.py only forwards a hardcoded whitelist of keys (_CONTEXT_CONFIGURABLE_KEYS) into the agent's configurable dict. Since agent_name was missing, custom agents never received their name — make_lead_agent always fell back to the default lead agent, skipping SOUL.md, per-agent config and skill filtering. Similarly, is_bootstrap was dropped, so the bootstrap creation flow could never activate the setup_agent tool path. Add both keys to the whitelist so they reach make_lead_agent. Fixes #2222 Co-authored-by: JasonOA888 --- backend/app/gateway/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/app/gateway/services.py b/backend/app/gateway/services.py index 172e27817..7dc22a9ef 100644 --- a/backend/app/gateway/services.py +++ b/backend/app/gateway/services.py @@ -298,6 +298,8 @@ async def start_run( "is_plan_mode", "subagent_enabled", "max_concurrent_subagents", + "agent_name", + "is_bootstrap", } configurable = config.setdefault("configurable", {}) for key in _CONTEXT_CONFIGURABLE_KEYS: