diff --git a/internal/llm/tools/bash.go b/internal/llm/tools/bash.go index ad8c799ac61485b3ea7d99b03643644dfa5ee319..6b55820632029e84f9381faa5ca2bd25734abeee 100644 --- a/internal/llm/tools/bash.go +++ b/internal/llm/tools/bash.go @@ -370,10 +370,11 @@ func (b *bashTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error) return ToolResponse{}, fmt.Errorf("session ID and message ID are required for executing shell command") } if !isSafeReadOnly { + shell := shell.GetPersistentShell(b.workingDir) p := b.permissions.Request( permission.CreatePermissionRequest{ SessionID: sessionID, - Path: b.workingDir, + Path: shell.GetWorkingDir(), ToolCallID: call.ID, ToolName: BashToolName, Action: "execute",