[codex] Add agent funnel telemetry - #262
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
flashtype-website | 7f3e030 | Commit Preview URL Branch Preview URL |
Jul 02 2026, 10:26 PM |
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.
Summary
agent_start_failedandprompt_submittedtelemetry events.agent_start_failedfor handled agent version startup failures and unexpected terminal startup failures, including initial command write failures.prompt_submittedfrom agentturn-starthooks with safe funnel properties:agent,surface,source, andattempt_number.Why
The onboarding funnel had a blind spot between
agent_openedanddiff_opened, making it impossible to distinguish users who never submitted a prompt from users whose submitted prompt produced no visible diff. Agent startup failures also rendered an error card without structured telemetry.Validation
pnpm vitest run src/extensions/terminal/index.test.tsx src/lib/telemetry.test.ts electron/telemetry.test.mjspnpm vitest run src/shell/layout-shell.test.tsx -t "prompt submitted"pnpm prettier --check electron/types.d.ts src/shell/layout-shell.tsx src/shell/layout-shell.test.tsx src/extensions/terminal/index.tsx src/extensions/terminal/index.test.tsxKnown issue
pnpm run typecheckstill fails on existing unrelated Lix SDK type drift around missingExecuteOptionsexports insrc/lib/lix-types.tsandsrc/test-utils/node-lix-sdk.ts.Note
Low Risk
Observability-only changes with no changes to auth, persistence, or agent execution behavior beyond firing telemetry on existing error paths and hook handlers.
Overview
Adds typed
agent_start_failedandprompt_submitteddesktop telemetry events to close gaps betweenagent_openedanddiff_opened.Terminal startup:
TerminalViewnow emitsagent_start_failedwhen agent terminals fail to start—version check outcomes (missing, unsupported, timeout, etc.), unexpected PTY/create errors, and initial command write failures. Payloads includeagent,reason,surface: terminal,retry_count, and version fields when applicable; unexpected failures also callcaptureTelemetryException.Prompt funnel: On agent
turn-starthooks, the layout shell recordsprompt_submittedwithagent,surface: terminal,source: agent_hook, and a per-sessionattempt_numberkeyed by instance, agent, and session.Tests mock telemetry in terminal and layout-shell suites to assert event names and properties.
Reviewed by Cursor Bugbot for commit 7f3e030. Bugbot is set up for automated code reviews on this repo. Configure here.