Repository navigation
Conversation
capture_ai_immediate and capture_ai_batch_immediate now apply the 8 MiB per-event limit before sending, like the background AI lane. An event over the limit is not sent and gets a local drop verdict with the detail ai_event_too_big in the returned CaptureSummary.
… its own backoff max_capture_attempts now defaults to 4 and retry_initial_backoff_ms to 100. Remote /flags retries use a fixed backoff of 300 ms, doubling up to 30 s, instead of the capture retry options.
eli-r-ph
force-pushed
the
v1-immediate-ai-size-and-retries
branch
from
October 12, 2026 17:34
5adc870 to
c68bee5
Compare
The test read each event's uuid before capture; setting it explicitly keeps the test independent of when the SDK assigns uuids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
This branch has not been deployed
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.
💡 Motivation and Context
The immediate AI methods sent events over the 8 MiB limit and let PostHog refuse them, while the background lane already dropped them locally. Retry defaults also differed from the other PostHog SDKs.
Changes
capture_ai_immediateandcapture_ai_batch_immediateno longer send an event whose properties exceed 8 MiB.CaptureSummaryreports it as adropwith detailai_event_too_big, counted insubmitted()./flagsretries get their own backoff: 300 ms, doubling up to 30 s.💚 How did you test it?
/flagsbackoff each fails a test.🤖 Generated with Claude Code