@@ -370,10 +370,11 @@ func (b *bashTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
370370 return ToolResponse{}, fmt.Errorf("session ID and message ID are required for executing shell command")
371371 }
372372 if !isSafeReadOnly {
373+ shell := shell.GetPersistentShell(b.workingDir)
373374 p := b.permissions.Request(
374375 permission.CreatePermissionRequest{
375376 SessionID: sessionID,
376− Path: b.workingDir,
377+ Path: shell.GetWorkingDir(),
377378 ToolCallID: call.ID,
378379 ToolName: BashToolName,
379380 Action: "execute",