{"record":{"id":"a7d5c79a8e4a30db","repo":"github/copilot-sdk","slug":"invalid-s-entry-q-there-is-no-bare-wildcard-us","errorCode":null,"errorMessage":"invalid %s entry %q: there is no bare wildcard. Use one or more of NewToolSet().AddBuiltIn(\"*\"), .AddMCP(\"*\"), or .AddCustom(\"*\") to target a specific source","messagePattern":"invalid (.+?) entry %q: there is no bare wildcard\\. Use one or more of NewToolSet\\(\\)\\.AddBuiltIn\\(\"\\*\"\\), \\.AddMCP\\(\"\\*\"\\), or \\.AddCustom\\(\"\\*\"\\) to target a specific source","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/mode_empty.go","lineNumber":46,"sourceCode":"\t}\n\tif opts.SessionFS != nil {\n\t\treturn\n\t}\n\tif _, ok := opts.Connection.(URIConnection); ok {\n\t\treturn\n\t}\n\tpanic(\"Client is in Mode=ModeEmpty but neither BaseDirectory, SessionFS, nor a URIConnection was supplied. \" +\n\t\t\"Empty mode requires explicit, per-tenant storage; set ClientOptions.BaseDirectory or .SessionFS, \" +\n\t\t\"or connect to an externally-managed runtime via URIConnection.\")\n}\n\n// validateToolFilterList rejects bare \"*\" entries with an actionable error\n// pointing at the [ToolSet] builder. Called for both availableTools and\n// excludedTools.\nfunc validateToolFilterList(field string, list []string) error {\n\tfor _, entry := range list {\n\t\tif entry == \"*\" {\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"invalid %s entry %q: there is no bare wildcard. \"+\n\t\t\t\t\t\"Use one or more of NewToolSet().AddBuiltIn(\\\"*\\\"), .AddMCP(\\\"*\\\"), or .AddCustom(\\\"*\\\") \"+\n\t\t\t\t\t\"to target a specific source\",\n\t\t\t\tfield, entry)\n\t\t}\n\t}\n\treturn nil\n}\n\n// resolveToolFilterOptions validates the configured tool filters and applies\n// empty-mode invariants. Returns the (possibly-mutated) request fields to set.\nfunc (c *Client) resolveToolFilterOptions(availableTools, excludedTools []string) (\n\t[]string, []string, *rpc.OptionsUpdateToolFilterPrecedence, error,\n) {\n\tif err := validateToolFilterList(\"availableTools\", availableTools); err != nil {\n\t\treturn nil, nil, nil, err\n\t}\n\tif err := validateToolFilterList(\"excludedTools\", excludedTools); err != nil {","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/go/mode_empty.go#L28-L64","documentation":"Tool filter lists (availableTools / excludedTools) do not accept a bare \"*\" wildcard, because that would be ambiguous about which tool source it applies to. validateToolFilterList rejects it and points to the ToolSet builder API (AddBuiltIn/AddMCP/AddCustom) for source-qualified wildcards.","triggerScenarios":"Passing [\"*\"] (or a list containing \"*\") as availableTools or excludedTools in SessionConfig/ResumeSessionConfig, or through any API that funnels into resolveToolFilterOptions.","commonSituations":"Users porting config from versions or other SDKs where \"*\" meant 'all tools'; copy-pasted config examples that predate the source-qualified wildcard requirement.","solutions":["Replace the bare \"*\" with a NewToolSet() builder expression such as AddBuiltIn(\"*\") to include/exclude all built-in tools.","Add source-qualified entries for each source you intend: .AddMCP(\"*\"), .AddCustom(\"*\") as needed.","Review the ToolSet documentation to express 'all tools' with explicit source coverage."],"exampleFix":"// before\nconfig.AvailableTools = []string{\"*\"}\n// after\nconfig.AvailableTools = NewToolSet().AddBuiltIn(\"*\").AddMCP(\"*\").AddCustom(\"*\").List()","handlingStrategy":"validation","validationCode":"func validateToolFilters(list []string) error {\n    for _, e := range list {\n        if e == \"*\" {\n            return fmt.Errorf(\"bare %q not allowed; use NewToolSet().AddBuiltIn(\\\"*\\\") etc.\", e)\n        }\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := client.CreateSession(ctx, cfg); err != nil {\n    if strings.Contains(err.Error(), \"there is no bare wildcard\") {\n        // fix config to use source-qualified wildcards\n    }\n}","preventionTips":["Never put \"*\" in availableTools/excludedTools lists","Express 'all tools' via NewToolSet() with per-source wildcards","Validate tool filter config at startup"],"tags":["config","validation","tool-filter"],"backgroundTag":"invalid-argument-value","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}