pulumi/pulumi · error

filesystem method %q is not yet implemented in pulumi neo CL

Error message

filesystem method %q is not yet implemented in pulumi neo CLI mode

What it means

The "grep_ast" filesystem method is a known tool name but has no implementation in the pulumi neo CLI mode; the dispatcher explicitly rejects it. This is a placeholder guard for a not-yet-ported capability, not a bug in the caller's arguments.

Source

Thrown at pkg/cmd/pulumi/neo/tools/filesystem.go:182

		}
		if err := json.Unmarshal(args, &p); err != nil {
			return nil, fmt.Errorf("decoding grep args: %w", err)
		}
		return nilOnError(f.grep(p.Pattern, p.Path, p.Include))
	case "content_replace":
		var p struct {
			Pattern     string `json:"pattern"`
			Replacement string `json:"replacement"`
			Path        string `json:"path"`
			FilePattern string `json:"file_pattern,omitempty"`
			DryRun      bool   `json:"dry_run,omitempty"`
		}
		if err := json.Unmarshal(args, &p); err != nil {
			return nil, fmt.Errorf("decoding content_replace args: %w", err)
		}
		return nilOnError(f.contentReplace(ctx, p.Pattern, p.Replacement, p.Path, p.FilePattern, p.DryRun))
	case "grep_ast":
		return nil, fmt.Errorf("filesystem method %q is not yet implemented in pulumi neo CLI mode", method)
	default:
		return nil, fmt.Errorf("unknown filesystem method %q", method)
	}
}

// nilOnError drops a method's zero-valued result on the floor when it returns
// an error, so Filesystem.Invoke yields an untyped-nil `any` instead of an
// interface that wraps a zero struct. Without this Session.invokeToolCall keeps
// the empty struct as Content (a zero struct boxed into any is non-nil), and
// the agent sees IsError=true with no failure reason.
func nilOnError[T any](v T, err error) (any, error) {
	if err != nil {
		return nil, err
	}
	return v, nil
}

// resolve safely interprets a path supplied by the agent, which may be absolute or

View on GitHub (pinned to 793f7b2e16)

Solutions

  1. Use the line-oriented "grep" method instead for regex search.
  2. Upgrade the pulumi CLI in case a newer version implements grep_ast.
  3. Update the agent's tool description/prompt to exclude grep_ast in CLI mode.

Example fix

// before
Invoke(ctx, "grep_ast", args)
// after
Invoke(ctx, "grep", []byte(`{"pattern":"func Name","include":"*.go"}`))
Defensive patterns

Strategy: fallback

Validate before calling

unsupportedInCLIMode := method == "grep_ast"
if unsupportedInCLIMode {
    method = "grep" // fall back to line-oriented search
}

Type guard

supported := map[string]bool{"grep": true, "content_replace": true}
_, ok := supported[method]

Try / catch

result, err := fs.Invoke(ctx, method, args)
if err != nil && strings.Contains(err.Error(), "not yet implemented") {
    result, err = fs.Invoke(ctx, "grep", args) // degrade gracefully
}

Prevention

When it happens

Trigger: Calling Filesystem.Invoke with method "grep_ast" while running the neo CLI-mode filesystem tool.

Common situations: An agent discovers tool names from upstream mcp-claude-code docs and invokes grep_ast; a prompt or tool list advertises a capability the CLI build has not implemented.

Related errors


AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31). Data as JSON: /api/errors/cb392e193dfd7744. Report an issue: GitHub.