Call Tracing
Whether user input actually reaches a query, how deep a recursion runs across files, what always runs before a method, where an async boundary resumes — the answer lives in the call chain, not in the file that happens to be open.
Ask it. Watch the call.
Give the agent a ticket, the way you already do. It resolves the names on its own, and that is where it guesses. Switch Niro off and it works from the open files. Switch Niro on and you watch it call Niro, read the result, and answer from that.
Now ask it about your code
Paste this into the assistant you connected to Niro:
Trace the path from this entry point to where it actually writes.