Fix ClawHub install rate limiting by preferring /file endpoint#489
Open
mccar2cm wants to merge 1 commit intoRightNow-AI:mainfrom
Open
Fix ClawHub install rate limiting by preferring /file endpoint#489mccar2cm wants to merge 1 commit intoRightNow-AI:mainfrom
mccar2cm wants to merge 1 commit intoRightNow-AI:mainfrom
Conversation
The /download endpoint has a 20 req/window rate limit shared across
all users on the same IP, causing installs to fail with 429 on the
first attempt. The /file endpoint has a 120 req/window limit and
returns SKILL.md content directly — sufficient for most skills.
Changes:
- Try /skills/{slug}/file?path=SKILL.md first, fall back to /download
- Respect retry-after header instead of fixed exponential backoff
- Show actual server error messages in dashboard instead of generic text
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
|
thanks for this! we already implemented ClawHub rate limit retry with 5-attempt exponential backoff + jitter in v0.3.44 (fix for #492). appreciate the contribution |
Is it because the project is still in the early stages? Would it be better to accept community contributions? |
Author
|
No worries - I liked the idea of hitting the files endpoint then the download. Take a look, see if you think that is an interesting approach. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
/downloadendpoint has a 20 req/window rate limit shared across IPs, causing skill installs to fail with 429 even on the first attempt (common on shared hosting/VPS)/fileendpoint has a 120 req/window limit and returns SKILL.md content directly — sufficient for the majority of ClawHub skills/skills/{slug}/file?path=SKILL.mdfirst, falls back to/downloadonly for non-SKILL.md packages (zips, Node.js)retry-afterheader on 429 responses instead of fixed exponential backoffTest plan
agentmail) — should succeed via/fileendpoint/downloadcargo test --workspacepasses (1886 tests)cargo clippy --workspace --all-targets -- -D warningsis clean🤖 Generated with Claude Code