Skip to content

feat(tasks): let the agent-server send its own run callbacks - #116716

Closed
charlesvien wants to merge 7 commits into
masterfrom
feat/agent-server-callbacks
Closed

charlesvien wants to merge 7 commits into
masterfrom
feat/agent-server-callbacks

Conversation

@charlesvien

@charlesvien charlesvien commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Problem

  • agent-proxy and Django's ingest each parse the agent's event stream and call Django on its behalf.
  • So turn results only reach the workflow through the streaming plane, with the same parsing in two places.

Changes

  • The agent-server sends every callback itself to a new agent_callback endpoint: heartbeats, boot milestones, finished and failed turns, budget steers and process kills.
  • Turn results, budget steers and process kills go only after ingest acks the event, with its sequence. Django drops retried turn results on that sequence.
  • If the ack takes over 30s, a turn result goes without a sequence. A budget steer or process kill is dropped.
  • agent-proxy and Django ingest only stream for agents that send X-PostHog-Agent-Callbacks.
  • Behind tasks-agent-sends-callbacks. Older agent builds and Slack relay runs are unchanged.
  • Nothing changes for users.

Before

flowchart LR
    A{{agent-server}} -->|events| I[ingest: proxy or Django]
    I -->|parsed callbacks| D[Django API]
    D -->|signals| T[Temporal workflow]
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff;
    classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000;
    class A phBlue;
    class I,D phRed;
    class T phGray;
Loading

After

flowchart LR
    A{{agent-server}} -->|events| I[ingest: proxy or Django]
    I -->|ack + seq| A
    A -->|callbacks + seq| D[Django API]
    D -->|signals| T[Temporal workflow]
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff;
    classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000;
    class A phBlue;
    class I,D phRed;
    class T phGray;
Loading

How did you test this code?

Automated tests only. No end-to-end cloud run. Repo-wide mypy not run. Not covered: a server-level test that each agent server reports once per turn.

Test rationale: The agent's callbacks and the ingest handlers' silence must switch together, so each side has a test. The sender tests pin the ack and its final sequence after a restart. The endpoint tests check that only the run's own sandbox gets through and that a retried turn result is dropped.

Release status

  • This change is behind a feature flag and is not available to users

Docs update

Updated the agent-proxy README and docs/internal/task-run-api.md.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, claude-opus-5-5

  • Skills: /improving-drf-endpoints, /writing-tests, /writing-pr-descriptions, /debugging-ci-failures.
  • The ack-then-report design and seq dedupe follow a discussion with the agent infrastructure owner about ordering and retries.
  • desktop-skip-backend-check is set because the agent and backend halves can ship in either order.

@charlesvien charlesvien self-assigned this Oct 14, 2026
@trunk-io

trunk-io Bot commented Oct 14, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions github-actions Bot added the feature/agent-infra Feature Tag: Agent infra label Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

✅ Complexity (TypeScript) — clean

Cyclomatic complexity above the limit in changed typescript files (10 for production files, 15 for test files). Warn only: worth simplifying when you next touch these functions.

✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

⚠️ Duplication (TypeScript) — 1 new duplicated block (worst 73 tokens)

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

First copy Second copy Lines Tokens
packages/agent/packages/agent/src/server/agent-server.ts:757 packages/agent/packages/agent/src/server/pi-agent-server.ts:245 12 73
⚠️ Bundle size — 🔺 +168.4 KiB (+0.2%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 76.50 MiB · 🔺 +168.4 KiB (+0.2%)

File Size Δ vs base
exporter/src/exporter/scenes/ExporterNotebookScene.js 3.87 MiB 🔺 +40.6 KiB (+1.0%)
render-query/src/render-query/render-query.js 24.56 MiB 🟢 -35.7 KiB (-0.1%)
posthog-app/_parent/products/signals/frontend/inbox/InboxScene.js 459.4 KiB 🔺 +5.4 KiB (+1.2%)
posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ScannerEditorScene.js 82.8 KiB 🔺 +3.4 KiB (+4.3%)
posthog-app/_parent/products/product_analytics/frontend/insights/savedInsights/SavedInsights.js 113.5 KiB 🔺 +2.4 KiB (+2.2%)
posthog-app/_parent/products/signals/frontend/inbox/components/config/scouts/ScoutAiPanel.js 2.4 KiB 🔺 +2.4 KiB (new)
posthog-app/_parent/products/metrics/frontend/MetricsScene.js 78.5 KiB 🔺 +2.3 KiB (+3.1%)
posthog-app/src/scenes/terminal/TerminalPanel.js 3.5 KiB 🟢 -2.2 KiB (-38.2%)
posthog-app/src/scenes/surveys/wizard/SurveyWizard.js 71.3 KiB 🔺 +2.1 KiB (+3.1%)
posthog-app/src/scenes/marketing-analytics/MarketingAnalyticsScene.js 188.6 KiB 🔺 +1.8 KiB (+1.0%)
posthog-app/_parent/products/cdp/frontend/HogFunctionPermissionPreview.js 5.2 KiB 🟢 -1.8 KiB (-25.5%)
posthog-app/src/layout/navigation-3000/sidepanel/panels/discussion/SidePanelDiscussion.js 4.7 KiB 🟢 -1.8 KiB (-27.4%)
posthog-app/src/scenes/AuthenticatedShell.js 319.2 KiB 🔺 +1.5 KiB (+0.5%)
posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene.js 205.5 KiB 🔺 +1.5 KiB (+0.7%)
posthog-app/src/scenes/project-files/ProjectFilesScene.js 6.0 KiB 🔺 +1.4 KiB (+29.5%)
posthog-app/src/scenes/max/Max.js 32.5 KiB 🔺 +1.3 KiB (+4.3%)
posthog-app/_parent/products/signals/frontend/inbox/components/detail/ReportAiPanel.js 16.2 KiB 🔺 +1.3 KiB (+9.0%)
posthog-app/_parent/products/persons/frontend/pages/PersonScene.js 48.0 KiB 🔺 +1.3 KiB (+2.8%)
posthog-app/_parent/products/groups/frontend/pages/Group.js 38.5 KiB 🔺 +1.3 KiB (+3.5%)
posthog-app/src/scenes/notebooks/NotebookCanvasScene.js 28.1 KiB 🔺 +1.3 KiB (+4.8%)
posthog-app/src/scenes/notebooks/NotebookPanel/NotebookPanel.js 29.9 KiB 🔺 +1.3 KiB (+4.5%)
posthog-app/src/scenes/notebooks/NotebookScene.js 37.6 KiB 🔺 +1.3 KiB (+3.6%)
posthog-app/src/scenes/project-homepage/ai-first/AiFirstHomepage.js 45.7 KiB 🔺 +1.3 KiB (+2.9%)
posthog-app/_parent/products/review_hog/frontend/CodeReviewScene.js 115.5 KiB 🔺 +1.3 KiB (+1.1%)
posthog-app/src/scenes/experiments/Experiment.js 310.1 KiB 🔺 +1.2 KiB (+0.4%)
posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene.js 79.5 KiB 🔺 +1.2 KiB (+1.5%)
posthog-app/_parent/products/tracing/frontend/TracingScene.js 188.5 KiB 🔺 +1.2 KiB (+0.6%)
posthog-app/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene.js 74.7 KiB 🔺 +1.1 KiB (+1.5%)
posthog-app/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene.js 23.4 KiB 🔺 +1.1 KiB (+5.1%)
posthog-app/src/scenes/new-tab/NewTabScene.js 6.1 KiB 🔺 +1.1 KiB (+22.8%)
posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene.js 102.4 KiB 🔺 +1.1 KiB (+1.1%)
posthog-app/src/scenes/session-recordings/SessionRecordings.js 17.7 KiB 🔺 +1.1 KiB (+6.6%)
posthog-app/src/scenes/session-recordings/settings/SessionRecordingsSettingsScene.js 18.7 KiB 🔺 +1.1 KiB (+6.2%)
posthog-app/_parent/products/marketing_analytics/frontend/ConversionRecordingsModal.js 20.7 KiB 🔺 +1.1 KiB (+5.6%)
posthog-app/src/scenes/insights/InsightScene.js 56.4 KiB 🔺 +1.1 KiB (+2.0%)
posthog-app/_parent/products/ai_observability/frontend/AIObservabilityScene.js 169.7 KiB 🔺 +1.1 KiB (+0.6%)
posthog-app/src/scenes/data-pipelines/batch-exports/BatchExportScene.js 80.4 KiB 🔺 +1.1 KiB (+1.3%)
posthog-app/src/scenes/feature-flags/FeatureFlag.js 137.9 KiB 🔺 +1.1 KiB (+0.8%)
posthog-app/_parent/products/endpoints/frontend/EndpointScene.js 65.8 KiB 🔺 +1.1 KiB (+1.6%)
posthog-app/_parent/products/replay_vision/frontend/observations/ObservationRecording.js 17.9 KiB 🔺 +1.1 KiB (+6.3%)
posthog-app/src/scenes/session-recordings/detail/SessionRecordingDetail.js 18.1 KiB 🔺 +1.1 KiB (+6.2%)
posthog-app/src/scenes/session-recordings/kiosk/SessionRecordingsKiosk.js 26.1 KiB 🔺 +1.1 KiB (+4.2%)
posthog-app/src/scenes/session-recordings/player/modal/SessionPlayerModal.js 18.7 KiB 🔺 +1.1 KiB (+6.0%)
posthog-app/src/scenes/sessions/SessionProfileScene.js 31.0 KiB 🔺 +1.1 KiB (+3.5%)
posthog-app/src/scenes/surveys/Survey.js 14.9 KiB 🔺 +1.1 KiB (+7.7%)
posthog-app/src/scenes/session-recordings/file-playback/SessionRecordingFilePlaybackScene.js 20.8 KiB 🔺 +1.1 KiB (+5.4%)
posthog-app/src/scenes/hog-functions/HogFunctionScene.js 57.4 KiB 🔺 +1.0 KiB (+1.8%)
posthog-app/src/scenes/settings/SettingsScene.js 17.2 KiB 🔺 +1.0 KiB (+6.4%)
posthog-app/src/layout/panel-layout/navbar/tabs/NavTabChat.js 22.0 KiB 🔺 +1.0 KiB (+4.9%)
posthog-app/_parent/products/business_knowledge/frontend/scenes/playground/BusinessKnowledgePlaygroundScene.js 27.7 KiB 🔺 +1.0 KiB (+3.9%)
posthog-app/_parent/products/business_knowledge/frontend/scenes/settings/BusinessKnowledgeSettingsScene.js 14.5 KiB 🔺 +1.0 KiB (+7.7%)
posthog-app/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene.js 13.7 KiB 🔺 +1.0 KiB (+8.1%)
posthog-app/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene.js 13.5 KiB 🔺 +1.0 KiB (+8.2%)
posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsAccountScene/CustomerAnalyticsAccountScene.js 63.6 KiB 🔺 +1.0 KiB (+1.6%)
posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene.js 15.7 KiB 🔺 +1.0 KiB (+7.0%)
posthog-app/_parent/products/error_tracking/frontend/posthogAi/ErrorTrackingWidget.js 14.8 KiB 🔺 +1.0 KiB (+7.5%)
posthog-app/_parent/products/logs/frontend/components/LogsViewer/LogsViewerModal/LogsViewerModal.js 9.0 KiB 🔺 +1.0 KiB (+12.9%)
posthog-app/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene.js 21.5 KiB 🔺 +1.0 KiB (+5.0%)
posthog-app/_parent/products/posthog_ai/frontend/scenes/TaskTracker/TaskTracker.js 104.9 KiB 🔺 +1.0 KiB (+1.0%)
posthog-app/_parent/products/tasks/frontend/spaces/SpaceScene.js 72.3 KiB 🔺 +1.0 KiB (+1.4%)
posthog-app/src/scenes/settings/SettingsMap.js 13.6 KiB 🔺 +1.0 KiB (+8.2%)
posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner.js 69.5 KiB 🔺 +1.0 KiB (+1.5%)
posthog-app/src/scenes/product-tours/ProductTour.js 178.7 KiB 🔺 +1.0 KiB (+0.6%)
posthog-app/_parent/products/ai_observability/frontend/AIObservabilitySessionScene.js 14.4 KiB 🔺 +1020 B (+7.4%)
posthog-app/_parent/products/posthog_ai/frontend/scenes/TaskTracker/components/EmbeddedTaskComposerImpl.js 13.6 KiB 🔺 +1020 B (+7.9%)
posthog-app/_parent/products/posthog_ai/frontend/scenes/TaskTracker/components/SidePanelRunnerImpl.js 18.4 KiB 🔺 +1020 B (+5.7%)
posthog-app/_parent/products/replay_vision/frontend/replay_scanners/components/ScannerScoutsTab.js 21.6 KiB 🔺 +1020 B (+4.8%)

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

✅ Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1005.3 KiB · 23 files 🟢 -474 B (-0.0%) █████████░ 85.8% of 1.14 MiB
logged-out boot: index + App + bootApp (preloaded by every page, including /login)
src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
2.87 MiB · 606 files 🔺 +2.0 KiB (+0.1%) █████████░ 94.6% of 3.03 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
7.49 MiB · 2,560 files 🔺 +20.6 KiB (+0.3%) ██████████ 98.0% of 7.64 MiB
dashboard scene
src/scenes/dashboard/Dashboard.tsx
9.63 MiB · 3,613 files 🟢 -88.5 KiB (-0.9%) █████████░ 93.5% of 10.30 MiB
today home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
7.51 MiB · 2,570 files 🔺 +20.6 KiB (+0.3%) ██████████ 95.2% of 7.89 MiB
events scene
src/scenes/activity/explore/EventsScene.tsx
9.21 MiB · 3,440 files 🟢 -90.6 KiB (-1.0%) █████████░ 93.2% of 9.88 MiB
replay detail scene
src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
11.94 MiB · 4,288 files 🟢 -69.0 KiB (-0.6%) ████████░░ 79.3% of 15.05 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/zod/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/billing/billingLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/dashboards/frontend/widgets/previews/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 zod/v4/locales/de.js stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/project-homepage/today/TodayReportPage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/activity/explore/EventsScene.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
1.3 KiB src/index.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
839 B src/scenes/ChunkLoadErrorBoundary.tsx
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
Size File
319.8 KiB ../node_modules/.pnpm/posthog-js@1.438.8_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.1 KiB src/products.tsx
99.6 KiB src/lib/api.ts
69.0 KiB src/lib/lemon-ui/icons/icons.tsx
38.7 KiB ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
33.9 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
28.7 KiB src/scenes/scenes.ts
27.7 KiB src/lib/constants.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
319.8 KiB ../node_modules/.pnpm/posthog-js@1.438.8_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.8 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
185.5 KiB ../packages/quill/packages/quill/dist/index.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
139.9 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.1 KiB src/products.tsx
99.6 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
Size File
319.8 KiB ../node_modules/.pnpm/posthog-js@1.438.8_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.8 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
185.5 KiB ../packages/quill/packages/quill/dist/index.js
181.9 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
139.9 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.1 KiB src/products.tsx
99.6 KiB src/lib/api.ts
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
Size File
319.8 KiB ../node_modules/.pnpm/posthog-js@1.438.8_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.8 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
185.5 KiB ../packages/quill/packages/quill/dist/index.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
139.9 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.1 KiB src/products.tsx
99.6 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
Size File
319.8 KiB ../node_modules/.pnpm/posthog-js@1.438.8_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
280.8 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
185.5 KiB ../packages/quill/packages/quill/dist/index.js
181.9 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
139.9 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.1 KiB src/products.tsx
99.6 KiB src/lib/api.ts
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Size File
319.8 KiB ../node_modules/.pnpm/posthog-js@1.438.8_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
316.0 KiB ../node_modules/.pnpm/posthog-js@1.438.8_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
280.8 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
185.5 KiB ../packages/quill/packages/quill/dist/index.js
181.9 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.1 KiB src/products.tsx
99.6 KiB src/lib/api.ts

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

✅ Toolbar bundle — eager 2.23 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.23 MiB · 19 files 🟢 -396 B (-0.0%) ████░░░░░░ 39.0% of 5.72 MiB
Deferred (lazy) 2.10 MiB · 40 files no change n/a — loads on demand
Loader dist/toolbar.js 1.2 KiB no change █░░░░░░░░░ 6.0% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
874.3 KiB dist/toolbar/toolbar-app-UEOT4DKY.css
664.1 KiB dist/toolbar/chunk-chunk-4TDCH4UI.js
257.8 KiB dist/toolbar/chunk-chunk-IVAG7WAO.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
129.6 KiB dist/toolbar/chunk-chunk-RMTWAZQF.js
74.7 KiB dist/toolbar/toolbar-app-E7GZY5GY.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-XWIPUDQ6.js
21.7 KiB dist/toolbar/chunk-chunk-5MFOEAUI.js
6.8 KiB dist/toolbar/chunk-chunk-DV7IWQNF.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +550.2 KiB (+0.1%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1013.79 MiB · 🔺 +550.2 KiB (+0.1%)

ℹ️ MCP UI apps size — 31 app(s), 25418.0 KB JS

Built size of each MCP UI app (main.js + styles.css).

App JS CSS
debug 836.4 KB 205.8 KB
action 760.5 KB 205.8 KB
action-list 827.4 KB 205.8 KB
cohort 759.5 KB 205.8 KB
cohort-list 826.4 KB 205.8 KB
email-template 759.3 KB 205.8 KB
error-details 764.3 KB 205.8 KB
error-issue 760.8 KB 205.8 KB
error-issue-list 828.0 KB 205.8 KB
experiment 824.5 KB 205.8 KB
experiment-list 828.2 KB 205.8 KB
experiment-results 827.0 KB 205.8 KB
feature-flag 826.8 KB 205.8 KB
feature-flag-list 830.5 KB 205.8 KB
feature-flag-testing 762.7 KB 205.8 KB
inline-scan 759.9 KB 205.8 KB
insight-actors 825.9 KB 205.8 KB
llm-costs 823.2 KB 205.8 KB
session-recording 761.7 KB 205.8 KB
survey 761.0 KB 205.8 KB
survey-global-stats 823.2 KB 205.8 KB
survey-list 828.1 KB 205.8 KB
survey-stats 823.2 KB 205.8 KB
trace-span 759.8 KB 205.8 KB
trace-span-list 827.3 KB 205.8 KB
vision-observation-list 826.5 KB 205.8 KB
workflow 759.8 KB 205.8 KB
workflow-list 826.7 KB 205.8 KB
query-results 1076.9 KB 205.8 KB
render-ui 1148.1 KB 205.8 KB
visual-review-snapshots 764.3 KB 205.8 KB

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 6811672: 1 Must fix, 2 Should fix.

@posthog posthog Bot removed the reviewhog label Oct 14, 2026
@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Retrigger

[High impact] Agent server now sends its own task callbacks to the backend.

Fix run-bound authorization and heartbeat delivery during buffer exhaustion before merging; the required absent-result convention also needs to be satisfied.

Reviews (1) · Last reviewed commit: "Let the agent-server send its own run ca..." · Reviewed by Greptile

@charlesvien charlesvien added the desktop-skip-backend-check Skip the check that blocks desktop and backend changes in one PR label Oct 14, 2026

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed a60192c: 1 Should fix.

@trunk-io

trunk-io Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

@charlesvien

Copy link
Copy Markdown
Member Author

@PostHog review --deep

@posthog

posthog Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@charlesvien Your GitHub account is linked to more than one PostHog account, so I can't tell which to run this as. Disconnect GitHub from the accounts you don't use, then comment again.

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 6714b1e: 2 Should fix.

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed f992189: 1 Should fix. This pull request is large, so the review ran in 4 parts with less depth than usual.

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 3c7364b: 2 Should fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop-skip-backend-check Skip the check that blocks desktop and backend changes in one PR feature/agent-infra Feature Tag: Agent infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant