Repository navigation
Give the dashboard's task-service client a 30s read timeout - #439
Merged
Merged
Conversation
The full GET /tasks read regularly outlasts httpx's 5s default on a loaded host, and the service's SQLite busy timeout is also 5s, so the client gave up just as the server was waiting on a lock. The CLI's client now reads for 30s and connects within 5s; list_tasks_versioned's per-request wait + 10 long-poll timeout still overrides it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tildesrc
marked this pull request as ready for review
October 28, 2026 19:35
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.
The dashboard's
TaskServiceClientwas built with a barehttpx.Client, so it used httpx's default 5 s timeout. The fullGET /tasksread (~790 KB for ~860 tasks, plus a filesystem check per task for unhidden artifacts) regularly takes longer than that on a loaded host. The task service's SQLite busy timeout is also 5 s, so the client gave up at exactly the moment the server was still waiting on a lock.terminal/__main__.pyaddsSERVICE_TIMEOUT = httpx.Timeout(30.0, connect=5.0)and a_service_client()helper. Every client built in that file uses it:dashboard,tasks,console/start, and thequickstartclient passed to the console. Reads now get 30 s; connect stays at 5 s, so a service that's down still fails fast.list_tasks_versionedis unchanged. Its per-requestTimeout(wait + 10.0)still overrides the client default for the long-poll.tests/terminal/test_cli.pypin the timeout values, check that the dashboard's client is built with them, and check (viahttpx.MockTransport) that the long-poll still sendswait + 10while a plain read sends the client default.Other
httpx.Clientcall sites (the container entrypoint, hook and agent; the session service;console.py's join resolver;sessions.py) still use the default. They don't do the dashboard's full list read.🤖 Generated with Claude Code