Symbol Not Found
Symptoms
Section titled “Symptoms”canopy answer "where is the function \X` defined?”` returns “No strong match in this repository” for a symbol you know exists.- A recently added function is not findable after indexing.
list functions defined in \dir/“ misses entries you expect.
Likely Causes
Section titled “Likely Causes”| Cause | Indicator |
|---|---|
| File has not been indexed yet | File was added after the last canopy index run |
| File is excluded by ignore rules | File shows up in canopy index --list-ignored |
| Phrasing didn’t lock the router | Question lacked the entity type or backticks |
| Symbol shape isn’t statically extractable | Dynamically generated / metaprogrammed symbols |
| Index is stale or damaged | canopy doctor shows a problem |
Fix 1: Re-index
Section titled “Fix 1: Re-index”The most common cause. Indexing is incremental and fast:
canopy indexIf you use canopy serve --watch, changed files re-index automatically as you
edit — a missing new symbol usually means the watcher isn’t running.
Fix 2: Check the ignore rules
Section titled “Fix 2: Check the ignore rules”Canopy respects .gitignore, its bundled defaults, and .canopyignore. If the
file is excluded, its symbols don’t exist to the index:
canopy index --list-ignoredIf the file appears there, adjust .canopyignore (or pass the ignore-override
flags — see canopy index --help) and re-index.
Fix 3: Fix the phrasing
Section titled “Fix 3: Fix the phrasing”The router locks on when you name the entity type and backtick the symbol:
# Weak — falls through to semantic searchcanopy answer "where is createSession"
# Strong — routed straight to the symbol locatorcanopy answer "where is the function \`createSession\` defined?"If the symbol lives in a specific file, be explicit:
canopy answer "show \`createSession\` in \`src/auth/session.ts\`"Fix 4: Statically invisible symbols
Section titled “Fix 4: Statically invisible symbols”Symbols created at runtime — dynamically defined methods, macro-generated
functions, __getattr__-style dispatch — have no AST definition site to
extract. For those, ask by meaning instead:
canopy answer "how does session creation work?"The semantic recipe searches by content rather than by symbol table.
Fix 5: Rebuild from scratch
Section titled “Fix 5: Rebuild from scratch”If canopy doctor shows the index present but answers stay wrong:
canopy index --fullThis wipes and rebuilds the repo’s index completely.
Still stuck?
Section titled “Still stuck?”Email support@gulfshieldtech.com with the
output of canopy doctor and the exact question you asked.