René's URL Explorer Experiment


Title: Improve rate limit error messages for AI agents · Issue #2385 · github/github-mcp-server · GitHub

Open Graph Title: Improve rate limit error messages for AI agents · Issue #2385 · github/github-mcp-server

X Title: Improve rate limit error messages for AI agents · Issue #2385 · github/github-mcp-server

Description: Summary When the GitHub API returns a rate limit error, the message surfaced to the AI model as a tool result is either missing the retry duration entirely, or buries it inside a noisy raw HTTP string. This makes it hard for agents to kn...

Open Graph Description: Summary When the GitHub API returns a rate limit error, the message surfaced to the AI model as a tool result is either missing the retry duration entirely, or buries it inside a noisy raw HTTP str...

X Description: Summary When the GitHub API returns a rate limit error, the message surfaced to the AI model as a tool result is either missing the retry duration entirely, or buries it inside a noisy raw HTTP str...

Opengraph URL: https://github.com/github/github-mcp-server/issues/2385

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve rate limit error messages for AI agents","articleBody":"### Summary\n\nWhen the GitHub API returns a rate limit error, the message surfaced to the AI model as a tool result is either missing the retry duration entirely, or buries it inside a noisy raw HTTP string. This makes it hard for agents to know how long to wait before retrying.\n\nAll tool errors flow through `NewGitHubAPIErrorResponse` in `pkg/errors/error.go`, which formats the tool result as:\n\n```\n\u003ctool message\u003e: \u003cerr.Error()\u003e\n```\n\nFor a **primary rate limit** (`RateLimitError`), the agent sees:\n\n```\nsearch code: GET https://api.github.com/search/code: 403 API rate limit exceeded for user ID 12345. [rate reset in 47s]\n```\n\nThe reset time is present but buried inside a raw HTTP method + URL + status string.\n\nFor a **secondary (abuse) rate limit** (`AbuseRateLimitError`), the agent sees:\n\n```\nsearch code: GET https://api.github.com/search/code: 403 You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later.\n```\n\nThe `Retry-After` duration is **completely absent** — it is populated in the struct from the HTTP header but dropped by `AbuseRateLimitError.Error()` (tracked upstream in google/go-github#4180).\n\n### Suggested fix\n\nIn `NewGitHubAPIErrorResponse`, use `errors.As` to detect rate limit error types and return a clean, agent-friendly message:\n\n```go\nfunc NewGitHubAPIErrorResponse(ctx context.Context, message string, resp *github.Response, err error) *mcp.CallToolResult {\n    apiErr := newGitHubAPIError(message, resp, err)\n    if ctx != nil {\n        _, _ = addGitHubAPIErrorToContext(ctx, apiErr)\n    }\n\n    var rateLimitErr *github.RateLimitError\n    if errors.As(err, \u0026rateLimitErr) {\n        retryIn := time.Until(rateLimitErr.Rate.Reset.Time).Round(time.Second)\n        return utils.NewToolResultError(fmt.Sprintf(\n            \"%s: GitHub API rate limit exceeded. Retry after %v.\",\n            message, retryIn))\n    }\n\n    var abuseErr *github.AbuseRateLimitError\n    if errors.As(err, \u0026abuseErr) {\n        if abuseErr.RetryAfter != nil {\n            return utils.NewToolResultError(fmt.Sprintf(\n                \"%s: GitHub secondary rate limit exceeded. Retry after %v.\",\n                message, abuseErr.RetryAfter.Round(time.Second)))\n        }\n        return utils.NewToolResultError(fmt.Sprintf(\n            \"%s: GitHub secondary rate limit exceeded. Wait before retrying.\",\n            message))\n    }\n\n    return utils.NewToolResultErrorFromErr(message, err)\n}\n```\n\nThis gives the agent clear, actionable output:\n\n```\nsearch code: GitHub API rate limit exceeded. Retry after 47s.\n```\n\n```\nsearch code: GitHub secondary rate limit exceeded. Retry after 60s.\n```\n\n\u003e **Note:** This fix is independent of google/go-github#4180 — it reads `RetryAfter` directly from the struct rather than relying on `.Error()`. The go-github fix benefits all other callers of the library.\n\n\u003e [!NOTE]\n\u003e This issue was drafted with the assistance of GitHub Copilot.\n","author":{"url":"https://github.com/danmoseley","@type":"Person","name":"danmoseley"},"datePublished":"2026-04-25T18:54:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2385/github-mcp-server/issues/2385"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:91f676e5-8c5d-add2-16c0-7bd82b53a974
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE96E:10F607:F8935F:16768CD:6A622B3D
html-safe-noncebb51ac8c06aeec46860e4944f830f6d029f418aa3415b264dc50ed86f9a31600
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTZFOjEwRjYwNzpGODkzNUY6MTY3NjhDRDo2QTYyMkIzRCIsInZpc2l0b3JfaWQiOiI3NjEyNzc5OTcwMDIyMjIyNjUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb7f2d2a829d4a2580b358188d05b1156965ed4429fdfd9e3d32ada41b97a685b
hovercard-subject-tagissue:4328961598
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/2385/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0a6d86a276dd5c408137fdb087c3c53328821cb0650a6a020dfbad8f8a30336d/github/github-mcp-server/issues/2385
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0a6d86a276dd5c408137fdb087c3c53328821cb0650a6a020dfbad8f8a30336d/github/github-mcp-server/issues/2385
og:image:altSummary When the GitHub API returns a rate limit error, the message surfaced to the AI model as a tool result is either missing the retry duration entirely, or buries it inside a noisy raw HTTP str...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanmoseley
hostnamegithub.com
expected-hostnamegithub.com
None0e882415c7b47986d65f899389c870b31642bb1c6f36516eb042618596c60e62
turbo-cache-controlno-preview
go-importgithub.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id942771284
octolytics-dimension-repository_nwogithub/github-mcp-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id942771284
octolytics-dimension-repository_network_root_nwogithub/github-mcp-server
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release230e2af5fc0870303dd4569d72d2bb393ed52c52
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/github-mcp-server/issues/2385#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fissues%2F2385
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fissues%2F2385
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=github%2Fgithub-mcp-server
Reloadhttps://github.com/github/github-mcp-server/issues/2385
Reloadhttps://github.com/github/github-mcp-server/issues/2385
Reloadhttps://github.com/github/github-mcp-server/issues/2385
Please reload this pagehttps://github.com/github/github-mcp-server/issues/2385
github https://github.com/github
github-mcp-serverhttps://github.com/github/github-mcp-server
Notifications https://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server
Fork 4.6k https://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server
Star 31.7k https://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server
Code https://github.com/github/github-mcp-server
Issues 171 https://github.com/github/github-mcp-server/issues
Pull requests 163 https://github.com/github/github-mcp-server/pulls
Discussions https://github.com/github/github-mcp-server/discussions
Actions https://github.com/github/github-mcp-server/actions
Models https://github.com/github/github-mcp-server/models
Security and quality 2 https://github.com/github/github-mcp-server/security
Insights https://github.com/github/github-mcp-server/pulse
Code https://github.com/github/github-mcp-server
Issues https://github.com/github/github-mcp-server/issues
Pull requests https://github.com/github/github-mcp-server/pulls
Discussions https://github.com/github/github-mcp-server/discussions
Actions https://github.com/github/github-mcp-server/actions
Models https://github.com/github/github-mcp-server/models
Security and quality https://github.com/github/github-mcp-server/security
Insights https://github.com/github/github-mcp-server/pulse
#2386https://github.com/github/github-mcp-server/pull/2386
Improve rate limit error messages for AI agentshttps://github.com/github/github-mcp-server/issues/2385#top
#2386https://github.com/github/github-mcp-server/pull/2386
https://github.com/danmoseley
danmoseleyhttps://github.com/danmoseley
on Apr 25, 2026https://github.com/github/github-mcp-server/issues/2385#issue-4328961598
google/go-github#4180https://github.com/google/go-github/issues/4180
google/go-github#4180https://github.com/google/go-github/issues/4180
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.