mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 04:44:28 +00:00
fix(agent): reset SandboxManager before initializing to ensure fresh config for every session
This commit is contained in:
@@ -154,6 +154,9 @@ export async function createAgentSession(params: CreateAgentSessionParams) {
|
||||
}
|
||||
|
||||
// SandboxManager.initialize is a global operation that applies to the entire process.
|
||||
// We reset it first to ensure any previous process-global SOCKS/HTTP proxy servers
|
||||
// and callbacks are cleaned up, allowing the new callback and allowedDomains to take effect.
|
||||
await SandboxManager.reset()
|
||||
await SandboxManager.initialize(
|
||||
{
|
||||
network: {
|
||||
|
||||
Reference in New Issue
Block a user