Repository navigation
Conversation
GET /v1/sessions/:id/stream is gone, with its pacing config (FUNKY_STREAM_POLL_MS, FUNKY_STREAM_HEARTBEAT_MS). Clients follow a session by polling GET /v1/sessions/:id/entries?after=<seq>, which returns the same entry objects in seq order: the console's useEntries polls it once a second while the session can still change, the stack e2e follows the log the same way, and the README's quick start shows a curl loop. Behind Cloud Run's HTTP/1.1 a client hang-up never reaches the container, so every abandoned stream kept polling the store and held a request slot for up to an hour; reconnecting clients filled every slot and the api stopped answering. Funky runs deferrable batch work, which does not need push. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
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.
Funky is a batch engine for deferrable agent tasks, so push isn't worth what it costs. This deletes
GET /v1/sessions/:id/stream; clients follow a session by pollingGET /v1/sessions/:id/entries?after=<last seq>, which returns the same entry objects in seq order.Why now: behind Cloud Run's HTTP/1.1, a client hang-up never reaches the container. Every abandoned stream kept polling the store and held a request slot for up to an hour, and on 2026-10-26 reconnecting clients filled all 240 slots on the hosted api (3 instances × 80) until it stopped answering. Hardening the stream (h2c, #207) was the alternative; we're removing it instead.
Changes
FUNKY_STREAM_POLL_MS,FUNKY_STREAM_HEARTBEAT_MS, thestreamapp dependency,StreamPacing). Setting the removed env vars is harmless; they're ignored./entriesis unchanged, and its comment now says polling it from a cursor is how a client follows a session.useEntries):readEntries(id, { after: cursor })one request at a time, sending the next poll 1s after the previous one answers./entriesinstead of reading SSE.Breaking
/v1/sessions/:id/streamnow answers 404. There are no customers yet; funkyhq/cloud's console and smoke tests already poll.Checks
pnpm format:checkandpnpm typecheckare clean. api: 97 tests pass. worker: 20 pass, and the key-gated live suite is skipped. web has no tests; it typechecks and lints clean.🤖 Generated with Claude Code