Describe the bug
Say you have a file named: (pr that you want to find. You can search for this with Sourcebot via the query file:"\(pr".
If you Ask Sourcebot about it, it will try a number of things, all of which either result in query failure or returning incorrect results.
Query: find me file:"\(pr"
GPT-5-nano Response
-
Searched for \(pr
Failed with the following error: Failed to parse query "\(pr reposet:gitlab/example-repo" with message: No parse at 65
-
Searched for \(pr ( repo:gitlab/example-repo )
Failed with the following error: Failed to parse query "\(pr reposet:gitlab/example-repo ( repo:gitlab/example-repo )" with message: No parse at 127
-
Searched for pr ( repo:gitlab/example-repo )
Returned src/app/routes/endpoint.py
GPT-5-mini Response
-
I'll search the repository for files containing the literal substring "(pr" using the code search tool to locate all matches. This helps find files that include that pattern (likely a regex or string with an escaped parenthesis). I'll search only the selected repository.
Searched for \\(pr ( repo:gitlab/example-repo )
Failed with the following error: Failed to parse query "\\(pr reposet:gitlab/example-repo ( repo:gitlab/example-repo )" with message: No parse at 128
-
Searched for "\\(pr" ( repo:gitlab/example-repo )
Failed with the following error: Unexpected error: An unexpected error occurred. Please try again later.
Anthropic Claude Haiku 4.5
-
The user is asking me to find files with a pattern "(pr". This seems to be a search for code that contains this literal string pattern - likely a regex or string pattern in code.
Let me use the searchCode function to find this pattern. The user wants to search for the literal string "(pr" which appears to be a regex or escape sequence pattern.
Since this is a regex search, I should search for files that contain this pattern. The user's query is "(pr" which I should escape properly for a regex search.
Let me search for this code pattern.
"Search code" tool call failed
-
Searched for \\"\(pr ( repo:example-repo )
Failed with the following error: Failed to parse query "\\"\(pr reposet:gitlab/example-repo ( repo:example-repo )" with message: No parse at 90
-
Let me try a simpler regex pattern:
Searched for \(pr ( repo:example-repo )
Failed with the following error: Failed to parse query "\(pr reposet:gitlab/example-repo ( repo:example-repo )" with message: No parse at 87
-
Let me try searching for just "pr" pattern:
Searched for pr ( repo:example-repo )
src/app/routes/endpoint.py
To reproduce
Use Sourcebot's Ask tool about files with strange names, such as (pr.
Sourcebot deployment information
Sourcebot version: v4.10.13
Additional information
No response
Describe the bug
Say you have a file named:
(prthat you want to find. You can search for this with Sourcebot via the queryfile:"\(pr".If you Ask Sourcebot about it, it will try a number of things, all of which either result in query failure or returning incorrect results.
Query:
find me file:"\(pr"GPT-5-nano Response
Searched for
\(prFailed with the following error:
Failed to parse query "\(pr reposet:gitlab/example-repo" with message: No parse at 65Searched for
\(pr ( repo:gitlab/example-repo )Failed with the following error:
Failed to parse query "\(pr reposet:gitlab/example-repo ( repo:gitlab/example-repo )" with message: No parse at 127Searched for
pr ( repo:gitlab/example-repo )Returned src/app/routes/endpoint.py
GPT-5-mini Response
I'll search the repository for files containing the literal substring "(pr" using the code search tool to locate all matches. This helps find files that include that pattern (likely a regex or string with an escaped parenthesis). I'll search only the selected repository.
Searched for
\\(pr ( repo:gitlab/example-repo )Failed with the following error:
Failed to parse query "\\(pr reposet:gitlab/example-repo ( repo:gitlab/example-repo )" with message: No parse at 128Searched for
"\\(pr" ( repo:gitlab/example-repo )Failed with the following error:
Unexpected error: An unexpected error occurred. Please try again later.Anthropic Claude Haiku 4.5
The user is asking me to find files with a pattern "(pr". This seems to be a search for code that contains this literal string pattern - likely a regex or string pattern in code.
Let me use the searchCode function to find this pattern. The user wants to search for the literal string "(pr" which appears to be a regex or escape sequence pattern.
Since this is a regex search, I should search for files that contain this pattern. The user's query is "(pr" which I should escape properly for a regex search.
Let me search for this code pattern.
"Search code" tool call failed
Searched for
\\"\(pr ( repo:example-repo )Failed with the following error:
Failed to parse query "\\"\(pr reposet:gitlab/example-repo ( repo:example-repo )" with message: No parse at 90Let me try a simpler regex pattern:
Searched for
\(pr ( repo:example-repo )Failed with the following error:
Failed to parse query "\(pr reposet:gitlab/example-repo ( repo:example-repo )" with message: No parse at 87Let me try searching for just "pr" pattern:
Searched for
pr ( repo:example-repo )src/app/routes/endpoint.py
To reproduce
Use Sourcebot's Ask tool about files with strange names, such as
(pr.Sourcebot deployment information
Sourcebot version: v4.10.13
Additional information
No response