@@ -4,6 +4,7 @@ import (
5 "encoding/json"
5 "encoding/json"
@@ -259,7 +260,7 @@ func NewBashTool(permission permission.Service, workingDir string) BaseTool {
259 // Set up command blocking on the persistent shell
260 // Set up command blocking on the persistent shell
260 persistentShell := shell.GetPersistentShell(workingDir)
261 persistentShell := shell.GetPersistentShell(workingDir)
261 persistentShell.SetBlockFuncs(createCommandBlockFuncs())
262 persistentShell.SetBlockFuncs(createCommandBlockFuncs())
263 return &bashTool{
264 return &bashTool{
264 permissions: permission,
265 permissions: permission,
265 workingDir: workingDir,
266 workingDir: workingDir,
@@ -357,7 +358,20 @@ func (b *bashTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
357 stdout = truncateOutput(stdout)
358 stdout = truncateOutput(stdout)
358 stderr = truncateOutput(stderr)
359 stderr = truncateOutput(stderr)
361+ slog.Info("Bash command executed",
362+ "command", params.Command,
365+ "exit_code", exitCode,
366+ "interrupted", interrupted,
360 errorMessage := stderr
370 errorMessage := stderr
371+ if errorMessage == "" && err != nil {
372+ errorMessage = err.Error()
361 if interrupted {
375 if interrupted {
362 if errorMessage != "" {
376 if errorMessage != "" {
363 errorMessage += "\n"
377 errorMessage += "\n"