From 72dc56689031b5d79225e36ef6d85c6ddfcd3760 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Fri, 29 Aug 2025 10:12:56 -0300 Subject: [PATCH] sec: show persistent shell path in permission dialog (#916) Currently it will always show the path of when it was started. Signed-off-by: Carlos Alexandro Becker --- internal/llm/tools/bash.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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",