You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: LocalFilesystem grep corrupts JSON-escaped match text #4134
Local grep_files results do not preserve the matching text when ripgrep is installed. A line containing a double quote is cut off at the first escaped quote. Backslashes, tabs and line terminators remain JSON-escaped in the returned GrepMatch.text().
The search finds the right lines, but the agent sees different text from the file. For example, a source line needle = "hello"; is returned as needle = \.
The match text is needle = "hello";, without its line terminator. Quotes, backslashes and tabs should be the original characters, not their JSON representation.
Error messages
No exception is raised. The returned text is incorrect.
Environment
AgentScope Java: main at 2d70942c (2.1.0-SNAPSHOT)
Java 17, Windows 11, ripgrep 15.2.0
Additional context
LocalFilesystem.parseRipgrepJsonLine extracts strings by looking for the next ", without decoding JSON escapes. The real ripgrep/public grep path reproduces this, and eight regression cases fail on the original implementation. I am preparing a focused fix using the existing JSON codec; no new dependencies or search-policy changes are needed.
Activity