Code has commentary parts, which vanish when generating AST. Also, if feeding AST, sometimes the broad context is lost. And, AST might have a compression advantage on looong code, but inflate on short functions (means it would be better to feed the code line) and from my experience, AST use up more tokens then the plain code just caused by "AST representation is longer than the peace of code it represents". So, I stopped trying to teach Claude what I wanted with the AST.
Couldn't that problem be mitigated by offering the agents tools to query the AST and isolate the code they want to read or change? Wouldn't this work better that the grep tools? Regarding the comments, I agree that AST do not provide the much broader context!