@@ -54,7 +54,7 @@ func NewLsTool(permissions permission.Service, workingDir string, lsConfig confi
5454 func(ctx context.Context, params LSParams, call fantasy.ToolCall) (fantasy.ToolResponse, error) {
5555 searchPath, err := fsext.Expand(cmp.Or(params.Path, workingDir))
5656 if err != nil {
57− return fantasy.ToolResponse{}, fmt.Errorf("error expanding path: %w", err)
57+ return fantasy.NewTextErrorResponse(fmt.Sprintf("error expanding path: %v", err)), nil
5858 }
5959
6060 if !filepath.IsAbs(searchPath) {
@@ -64,12 +64,12 @@ func NewLsTool(permissions permission.Service, workingDir string, lsConfig confi
6464 // Check if directory is outside working directory and request permission if needed
6565 absWorkingDir, err := filepath.Abs(workingDir)
6666 if err != nil {
67− return fantasy.ToolResponse{}, fmt.Errorf("error resolving working directory: %w", err)
67+ return fantasy.NewTextErrorResponse(fmt.Sprintf("error resolving working directory: %v", err)), nil
6868 }
6969
7070 absSearchPath, err := filepath.Abs(searchPath)
7171 if err != nil {
72− return fantasy.ToolResponse{}, fmt.Errorf("error resolving search path: %w", err)
72+ return fantasy.NewTextErrorResponse(fmt.Sprintf("error resolving search path: %v", err)), nil
7373 }
7474
7575 relPath, err := filepath.Rel(absWorkingDir, absSearchPath)