Summary
During sentry init, the plan-codemods step can leave the spinner showing the same static text ("Planning code changes...") for up to ~3 minutes. In that window the server is fetching SDK docs (docs MCP) and running the codemod-planner agent, but the CLI has no idea anything is progressing — so the UI looks frozen.
This has caused at least a couple of users to bail out of init, assuming it had hung.
Why it happens
The CLI's UI is driven by the suspend/resume loop in wizard-runner.ts. The spinner text only changes when the server suspends with a new payload (whose detail field we render), or when a step transition flips activeLabel.
The plan-codemods step suspends once for read-files, then the CLI resumes and the server does all of its slow work without suspending again:
- Fetch the SDK docs markdown (docs fetcher / docs MCP)
- Run the
codemod-planner agent
During that whole stretch run.resumeAsync() is just blocking, no round-trip happens, and the spinner is stuck on the last STEP_ACTIVE_LABELS["plan-codemods"] value:
src/lib/init/clack-utils.ts:192 → "plan-codemods": "Planning code changes..."
src/lib/init/wizard-runner.ts:935-944 → label is set once per suspend, not while the server works
The same pattern affects any other long, non-suspending agent phase (e.g. detect-platform analysis), but plan-codemods is the worst offender because docs fetch + planner agent stack up.
What we want
Show progress text that advances during the wait, the same way we already do when analyzing / reading files (the detail string we surface from tool suspends). Options to consider:
- Server-side intermediate suspends / status pings — have the server emit lightweight progress updates during
plan-codemods (e.g. "Fetching SDK docs..." → "Generating integration plan...") so the CLI can update the spinner detail between sub-phases. (Server change lives in the cli-init-api repo, but the CLI just needs to render whatever detail it receives.)
- Client-side rotating status — while resumed and waiting on a known long step, rotate through descriptive messages (similar to the "Did you know?" tip rotation) so the user sees motion and an honest sense of what's happening. This is fully CLI-side.
- Possibly surface elapsed time / a note that AI planning can take a couple of minutes.
The goal: never show the identical static line for minutes at a time on the slowest step.
Acceptance criteria
Relevant files (this repo)
src/lib/init/wizard-runner.ts (suspend/resume loop, spinner detail handling ~L230-260, L935-944)
src/lib/init/clack-utils.ts (STEP_ACTIVE_LABELS)
A companion server-side change (intermediate suspends/status from plan-codemods) would live in the separate cli-init-api repo if we go the server-driven route.
Summary
During
sentry init, theplan-codemodsstep can leave the spinner showing the same static text ("Planning code changes...") for up to ~3 minutes. In that window the server is fetching SDK docs (docs MCP) and running thecodemod-planneragent, but the CLI has no idea anything is progressing — so the UI looks frozen.This has caused at least a couple of users to bail out of init, assuming it had hung.
Why it happens
The CLI's UI is driven by the suspend/resume loop in
wizard-runner.ts. The spinner text only changes when the server suspends with a new payload (whosedetailfield we render), or when a step transition flipsactiveLabel.The
plan-codemodsstep suspends once forread-files, then the CLI resumes and the server does all of its slow work without suspending again:codemod-planneragentDuring that whole stretch
run.resumeAsync()is just blocking, no round-trip happens, and the spinner is stuck on the lastSTEP_ACTIVE_LABELS["plan-codemods"]value:src/lib/init/clack-utils.ts:192→"plan-codemods": "Planning code changes..."src/lib/init/wizard-runner.ts:935-944→ label is set once per suspend, not while the server worksThe same pattern affects any other long, non-suspending agent phase (e.g.
detect-platformanalysis), butplan-codemodsis the worst offender because docs fetch + planner agent stack up.What we want
Show progress text that advances during the wait, the same way we already do when analyzing / reading files (the
detailstring we surface from tool suspends). Options to consider:plan-codemods(e.g."Fetching SDK docs..."→"Generating integration plan...") so the CLI can update the spinnerdetailbetween sub-phases. (Server change lives in thecli-init-apirepo, but the CLI just needs to render whateverdetailit receives.)The goal: never show the identical static line for minutes at a time on the slowest step.
Acceptance criteria
plan-codemods(docs fetch + planner agent), the user sees text that changes / reflects the current sub-phase instead of a single frozen line.--no-tui/LoggingUIpath.Relevant files (this repo)
src/lib/init/wizard-runner.ts(suspend/resume loop, spinnerdetailhandling ~L230-260, L935-944)src/lib/init/clack-utils.ts(STEP_ACTIVE_LABELS)A companion server-side change (intermediate suspends/status from
plan-codemods) would live in the separatecli-init-apirepo if we go the server-driven route.