{"record":{"id":"cb392e193dfd7744","repo":"pulumi/pulumi","slug":"filesystem-method-q-is-not-yet-implemented-in-pul","errorCode":null,"errorMessage":"filesystem method %q is not yet implemented in pulumi neo CLI mode","messagePattern":"filesystem method %q is not yet implemented in pulumi neo CLI mode","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/pulumi/neo/tools/filesystem.go","lineNumber":182,"sourceCode":"\t\t}\n\t\tif err := json.Unmarshal(args, &p); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"decoding grep args: %w\", err)\n\t\t}\n\t\treturn nilOnError(f.grep(p.Pattern, p.Path, p.Include))\n\tcase \"content_replace\":\n\t\tvar p struct {\n\t\t\tPattern     string `json:\"pattern\"`\n\t\t\tReplacement string `json:\"replacement\"`\n\t\t\tPath        string `json:\"path\"`\n\t\t\tFilePattern string `json:\"file_pattern,omitempty\"`\n\t\t\tDryRun      bool   `json:\"dry_run,omitempty\"`\n\t\t}\n\t\tif err := json.Unmarshal(args, &p); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"decoding content_replace args: %w\", err)\n\t\t}\n\t\treturn nilOnError(f.contentReplace(ctx, p.Pattern, p.Replacement, p.Path, p.FilePattern, p.DryRun))\n\tcase \"grep_ast\":\n\t\treturn nil, fmt.Errorf(\"filesystem method %q is not yet implemented in pulumi neo CLI mode\", method)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown filesystem method %q\", method)\n\t}\n}\n\n// nilOnError drops a method's zero-valued result on the floor when it returns\n// an error, so Filesystem.Invoke yields an untyped-nil `any` instead of an\n// interface that wraps a zero struct. Without this Session.invokeToolCall keeps\n// the empty struct as Content (a zero struct boxed into any is non-nil), and\n// the agent sees IsError=true with no failure reason.\nfunc nilOnError[T any](v T, err error) (any, error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn v, nil\n}\n\n// resolve safely interprets a path supplied by the agent, which may be absolute or","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/pulumi/neo/tools/filesystem.go#L164-L200","documentation":"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.","triggerScenarios":"Calling Filesystem.Invoke with method \"grep_ast\" while running the neo CLI-mode filesystem tool.","commonSituations":"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.","solutions":["Use the line-oriented \"grep\" method instead for regex search.","Upgrade the pulumi CLI in case a newer version implements grep_ast.","Update the agent's tool description/prompt to exclude grep_ast in CLI mode."],"exampleFix":"// before\nInvoke(ctx, \"grep_ast\", args)\n// after\nInvoke(ctx, \"grep\", []byte(`{\"pattern\":\"func Name\",\"include\":\"*.go\"}`))","handlingStrategy":"fallback","validationCode":"unsupportedInCLIMode := method == \"grep_ast\"\nif unsupportedInCLIMode {\n    method = \"grep\" // fall back to line-oriented search\n}","typeGuard":"supported := map[string]bool{\"grep\": true, \"content_replace\": true}\n_, ok := supported[method]","tryCatchPattern":"result, err := fs.Invoke(ctx, method, args)\nif err != nil && strings.Contains(err.Error(), \"not yet implemented\") {\n    result, err = fs.Invoke(ctx, \"grep\", args) // degrade gracefully\n}","preventionTips":["Filter advertised tools to those implemented in the current mode.","Pin the CLI version and check release notes for new tool methods.","Document capability differences between CLI mode and upstream MCP mode."],"tags":["unimplemented","tooling","feature-gap"],"backgroundTag":"method-not-implemented","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}