Files
picoclaw/pkg
yuchou87 aed7296c0d fix(agent): tie MCP connections to agent lifecycle context
- Defer MCP server initialization to Run() using agent's context
- Add mcpConfig and mcpInitOnce fields to AgentLoop
- Use sync.Once to ensure MCP loads exactly once with proper context
- Prevents orphaned subprocesses and resource leaks on cancellation

This fixes GitHub Copilot feedback that MCP connections with
context.Background() won't terminate when the agent stops, causing
potential resource leaks and orphaned stdio/SSE connections.
2026-02-16 19:53:15 +08:00
..
2026-02-16 11:46:02 +08:00
2026-02-09 19:20:19 +08:00
2026-02-16 16:30:54 +08:00