Write run_agent: find the module that defines a function
Code search is lookup with decoys: every caller of a function mentions its name.
Your task
Write run_agent. It names the module that defines a function, using two tools.
- search(query) returns the ids of files containing that text, shortest first
- fetch(doc_id) returns that file, or None when the id does not exist
- answer with the module name from the file's "# module:" header, or not found
- a file that imports or calls the function does not define it
- each scenario carries a token budget; going over it fails that scenario
At submit the suite runs your agent against codebases you have not seen, each with its own files.