Skip to content

Commit 2256f89

Browse files
committed
Don't reinitialize mcp tools in architect coder sub agent call
1 parent d322d57 commit 2256f89

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

aider/coders/architect_coder.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ async def reply_completed(self):
4242
kwargs["cache_prompts"] = False
4343
kwargs["num_cache_warming_pings"] = 0
4444
kwargs["summarize_from_coder"] = False
45+
kwargs["mcp_servers"] = [] # Empty to skip initialization
46+
47+
coder = await Coder.create(**kwargs)
48+
# Transfer MCP state to avoid re-initialization
49+
coder.mcp_servers = self.mcp_servers
50+
coder.mcp_tools = self.mcp_tools
51+
# Transfer TUI app weak reference
52+
coder.tui = self.tui
4553

4654
new_kwargs = dict(io=self.io, from_coder=self)
4755
new_kwargs.update(kwargs)

0 commit comments

Comments
 (0)