This repository was archived by the owner on Jul 27, 2026. It is now read-only.
feat: show a modal when an OpenHands Cloud conversation limit is reached - #1785
Closed
hieptl wants to merge 5 commits into
Closed
feat: show a modal when an OpenHands Cloud conversation limit is reached#1785hieptl wants to merge 5 commits into
hieptl wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hieptl
marked this pull request as draft
July 14, 2026 18:41
Member
|
This is still marked as draft, is it ready to review? |
Contributor
✅ Mock-LLM E2E Tests60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Contributor
✅ Mock-LLM Docker E2E Test Results60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Member
|
This repository has moved to https://github.com/OpenHands/OpenHands. We’d appreciate it if you re-opened this pull request there. Thank you! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
HUMAN:
OpenHands Cloud caps concurrent conversations and rejects creation with HTTP 429 and a body of: { detail: { error: "CONCURRENCY_LIMIT_REACHED", message, limit, current } } Previously this surfaced only as a generic error toast, leaving the user with no explanation or path to recover.
Tests: unit tests for the detector, the central handler (opens the modal and suppresses the toast), and the launcher's local toast suppression.
AGENT:
Why
When a user on an OpenHands Cloud backend reaches their concurrent-conversation limit, creating a new conversation now shows a clear, on-brand "Conversation limit reached" modal explaining the limit and how to recover — instead of a generic, confusing error toast.
OpenHands Cloud rejects over-limit conversation creation synchronously with
HTTP 429anddetail.error === "CONCURRENCY_LIMIT_REACHED"(see OpenHands#14168). ThatAxiosErrorpropagated unwrapped into the generic mutation-error funnel, so users only saw "Request failed with status code 429" with no context. This frontend never received the dedicated handling OpenHands' own UI has.Summary
status === 429+ thedetail.errorcode) in a small typed util, and read the backend-reporteddetail.limit.MutationCache.onError, mirroring the existing special-cases there. This opens the modal and skips the generic toast, and automatically covers every creation entry point. The home launcher's localonErroris guarded too (it dismisses its loading toast, then suppresses the duplicate error toast).ConversationLimitModal, built from existing primitives (ModalBackdrop,BrandButton, modal title classes) and driven by a small zustand store, mounted globally in the root layout next to the other app-level modals.Changes
New:
src/utils/concurrency-limit-error.ts—isConcurrencyLimitError/getConcurrencyLimitsrc/stores/conversation-limit-store.ts— modal open-state storesrc/components/features/conversation/conversation-limit-modal.tsx— the modalModified:
src/query-client-config.ts— central detection + toast suppressionsrc/components/features/home/home-chat-launcher.tsx— local toast guardsrc/routes/root-layout.tsx— mount the modal globallysrc/utils/constants.ts—DEFAULT_CONCURRENT_SANDBOX_LIMIT = 3fallbacksrc/i18n/translation.json— new keys in all 15 languagesTesting
src/utils/concurrency-limit-error.tsis the single detection point; conversation creation flows unchanged otherwise.New/extended tests (mocking the service, never the hook):
__tests__/utils/concurrency-limit-error.test.ts— detection + limit extraction.__tests__/query-client-config.test.ts— a 429 limit error opens the store and does not toast.__tests__/components/features/home/home-chat-launcher.test.tsx— the launcher suppresses the generic toast on a limit error.npm test,npm run typecheck, andnpm run lintpass.Issue Number
Resolves OpenHands/OpenHands#15469
How to Test
https://app.all-hands.dev, a Personal Workspace API key).Video/Screenshots
N/A.
Type
🐳 Docker images for this PR
• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas
ghcr.io/openhands/agent-canvasghcr.io/openhands/agent-server:1.37.0-pythonopenhands-automation==1.3.1ce5cd90184dfef3e32267e02d63d6ad0c366f211Pull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-ce5cd90Run
All tags pushed for this build
About Multi-Architecture Support
sha-ce5cd90) is a multi-arch manifest supporting both amd64 and arm64sha-ce5cd90-amd64) are also available if needed