Title: [bug] Ask cannot handle files with special characters · Issue #771 · sourcebot-dev/sourcebot · GitHub
Open Graph Title: [bug] Ask cannot handle files with special characters · Issue #771 · sourcebot-dev/sourcebot
X Title: [bug] Ask cannot handle files with special characters · Issue #771 · sourcebot-dev/sourcebot
Description: 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 f...
Open Graph Description: 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 thing...
X Description: 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 numbe...
Opengraph URL: https://github.com/sourcebot-dev/sourcebot/issues/771
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[bug] Ask cannot handle files with special characters","articleBody":"### Describe the bug\n\nSay you have a file named: `(pr` that you want to find. You can search for this with Sourcebot via the query `file:\"\\(pr\"`.\n\nIf you Ask Sourcebot about it, it will try a number of things, all of which either result in query failure or returning incorrect results.\n\nQuery: `find me file:\"\\(pr\"`\n\n\u003cdetails\u003e\u003csummary\u003eGPT-5-nano Response\u003c/summary\u003e\n\n1. Searched for `\\(pr`\nFailed with the following error: `Failed to parse query \"\\(pr reposet:gitlab/example-repo\" with message: No parse at 65`\n\n2. Searched for `\\(pr ( repo:gitlab/example-repo )`\nFailed with the following error: `Failed to parse query \"\\(pr reposet:gitlab/example-repo ( repo:gitlab/example-repo )\" with message: No parse at 127`\n\n3. Searched for `pr ( repo:gitlab/example-repo )`\nReturned src/app/routes/endpoint.py\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003eGPT-5-mini Response\u003c/summary\u003e\n\n1. 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.\nSearched for `\\\\(pr ( repo:gitlab/example-repo )`\nFailed with the following error: `Failed to parse query \"\\\\(pr reposet:gitlab/example-repo ( repo:gitlab/example-repo )\" with message: No parse at 128`\n\n2. Searched for `\"\\\\(pr\" ( repo:gitlab/example-repo )`\nFailed with the following error: `Unexpected error: An unexpected error occurred. Please try again later.`\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eAnthropic Claude Haiku 4.5\u003c/summary\u003e\n\n1. 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.\u003cbr\u003e\u003cbr\u003eLet 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.\u003cbr\u003e\u003cbr\u003eSince 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.\u003cbr\u003e\u003cbr\u003eLet me search for this code pattern.\u003cbr\u003e\"Search code\" tool call failed\n\n2. Searched for `\\\\\"\\(pr ( repo:example-repo )`\nFailed with the following error: `Failed to parse query \"\\\\\"\\(pr reposet:gitlab/example-repo ( repo:example-repo )\" with message: No parse at 90`\n\n3. Let me try a simpler regex pattern:\nSearched for `\\(pr ( repo:example-repo )`\nFailed with the following error: `Failed to parse query \"\\(pr reposet:gitlab/example-repo ( repo:example-repo )\" with message: No parse at 87`\n\n4. Let me try searching for just \"pr\" pattern:\nSearched for `pr ( repo:example-repo )`\nsrc/app/routes/endpoint.py\n\u003c/details\u003e\n\n### To reproduce\n\nUse Sourcebot's Ask tool about files with strange names, such as `(pr`.\n\n### Sourcebot deployment information\n\nSourcebot version: v4.10.13\n\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/marshallwp","@type":"Person","name":"marshallwp"},"datePublished":"2026-01-21T20:13:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/771/sourcebot/issues/771"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f06db9b0-19c3-b540-be81-7aeb08798531 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C618:141FAF:365F2D:4C3341:6A4E6B2A |
| html-safe-nonce | 8c971acf08512500bdead25faecb621a377891a0927c385b24b5b1d896dd30c0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjE4OjE0MUZBRjozNjVGMkQ6NEMzMzQxOjZBNEU2QjJBIiwidmlzaXRvcl9pZCI6IjI4Njc3OTY4NDEyNDM1MDM0MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f8070758751617d6c7a0801cbc7d4c73848995735f520fb9cb5b6d5d2726649 |
| hovercard-subject-tag | issue:3839854143 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sourcebot-dev/sourcebot/771/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b76ca443f7730023a09e4ecba5c56226322f67abeac23f02a112eb7b8c7a6c77/sourcebot-dev/sourcebot/issues/771 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b76ca443f7730023a09e4ecba5c56226322f67abeac23f02a112eb7b8c7a6c77/sourcebot-dev/sourcebot/issues/771 |
| og:image:alt | 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 thing... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | marshallwp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/sourcebot-dev/sourcebot git https://github.com/sourcebot-dev/sourcebot.git |
| octolytics-dimension-user_id | 135396723 |
| octolytics-dimension-user_login | sourcebot-dev |
| octolytics-dimension-repository_id | 846729675 |
| octolytics-dimension-repository_nwo | sourcebot-dev/sourcebot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 846729675 |
| octolytics-dimension-repository_network_root_nwo | sourcebot-dev/sourcebot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width