Skip to content

fix(errors): improve rate limit error messages for agents#2404

Open
Will-hxw wants to merge 3 commits intogithub:mainfrom
Will-hxw:fix/rate-limit-error-messages
Open

fix(errors): improve rate limit error messages for agents#2404
Will-hxw wants to merge 3 commits intogithub:mainfrom
Will-hxw:fix/rate-limit-error-messages

Conversation

@Will-hxw
Copy link
Copy Markdown

Summary

  • Detect RateLimitError and AbuseRateLimitError in NewGitHubAPIErrorResponse
  • Return clear, actionable messages with retry duration instead of burying information in raw HTTP strings
  • Example output: "search code: GitHub API rate limit exceeded. Retry after 47s."

Test plan

  • Build passes
  • Existing tests pass

🤖 Generated with Claude Code

…rors

The previous description gave AI models insufficient guidance on
GitHub code search syntax, leading to common mistakes like:
- Using \| instead of /...|.../ for regex OR
- Confusing filename: with path: qualifiers
- Misunderstanding boolean operator precedence

The new description explicitly documents:
- Qualifiers: repo:, org:, language:, path:, path:/regex/, symbol:, content:, is:
- Boolean operators: AND, OR, NOT, parentheses
- Regex syntax: surround with slashes e.g. /foo|bar/
- Glob patterns in path: path:*.ts, path:/src/**/*.js

Fixes github#2390
Allow get_job_logs tool to return logs for all jobs in a workflow
run when only run_id is provided (without failed_only parameter).
This matches the documented behavior where:
- run_id + failed_only=true returns only failed job logs
- run_id alone (or with failed_only=false) returns all job logs

Fixes github#2389
Detect RateLimitError and AbuseRateLimitError in NewGitHubAPIErrorResponse
and return clear, actionable messages with retry duration instead of
burying the information in raw HTTP strings.

Fixes github#2385
@Will-hxw Will-hxw requested a review from a team as a code owner April 29, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant