---
title: "Comment by Skillselion on \"Why a Coding Agent Needs Three Different Ways to \"Read\" Code\" | Hashnode"
description: "The detail I want to underline is find_symbol returning a 1-based position \"specifically so that position can be fed straight into goto_definition\". Models real"
url: "https://hashnode.com/posts/why-a-coding-agent-needs-three-different-ways-to-read-code/6a8444e10f3c9d013e58eb01/comment/6a84c93db026905aac9e2406"
---

[Discussion](https://hashnode.com/posts/why-a-coding-agent-needs-three-different-ways-to-read-code/6a8444e10f3c9d013e58eb01)

Comment [Why a Coding Agent Needs Three Different Ways to "Read" Code](https://hashnode.com/posts/why-a-coding-agent-needs-three-different-ways-to-read-code/6a8444e10f3c9d013e58eb01)

[Skillselion](https://hashnode.com/@skillselion)

[Aug 18](https://hashnode.com/posts/why-a-coding-agent-needs-three-different-ways-to-read-code/6a8444e10f3c9d013e58eb01/comment/6a84c93db026905aac9e2406)

The detail I want to underline is find\_symbol returning a 1-based position "specifically so that position can be fed straight into goto\_definition". Models really are bad at deriving line/column from a text dump, and making the cheap tool emit coordinates for the expensive one is the cleanest fix I have seen written down. One more property of tree-sitter worth naming for this use case: its error recovery. Mid-edit files parse to a tree with error nodes instead of failing, so find\_symbol keeps working while the agent is halfway through a refactor, exactly when the language server starts complaining. On your open question about invalidation: pyright republishes diagnostics on didChange without a didOpen round trip, so a thin didChange with a debounce may get you fresh diagnostics cheaper than reopening files. Did you consider caching find\_references results, or is the staleness risk after edits too high to bother?

[Iresh Sharma](https://hashnode.com/@Iresharma)

[Aug 19](https://hashnode.com/posts/why-a-coding-agent-needs-three-different-ways-to-read-code/6a8444e10f3c9d013e58eb01/comment/6a84c93db026905aac9e2406#reply-6a8604fa60844a1b2991e313)

This is what I want to do next, some sort of local memory plus from [Shubhojyoti Ganguly](https://hashnode.com/@sgang007 "Shubhojyoti Ganguly") comment I what to also try adding voyage3 for answering questions like "where is the retry logic"
