Skip to content

diag(#283): instrument transcript-load lifecycle (stuck-at-loading repro) - #284

Merged
Juliusolsson05 merged 1 commit into
mainfrom
diag/transcript-loading-stuck
Jun 18, 2026
Merged

Juliusolsson05 merged 1 commit into
mainfrom
diag/transcript-loading-stuck

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Diagnostic-only PR for #283 (session startup/resume stuck at "loading transcript"). No behavior change — temporary instrumentation to capture where the load breaks, to be reverted once the root cause is fixed.

What it logs ([xcript-diag] prefix)

src/renderer/src/workspace/hook/actions/initialHistory.ts

  • loading-set session=… kind=… — the unconditional 'loading' write.
  • ready-set session=… entries=… — the terminal 'ready' write (only when the runtime still exists).
  • RESOLVE-DROPPED session=… liveKeys=[…] — the smoking gun: the load finished but the runtime entry is gone, so 'ready' is discarded and the pane stays stuck. liveKeys shows what the id got remapped/rebuilt to.
  • ERROR-DROPPED session=… — same, on the error path.

src/renderer/src/workspace/hook/persistence/rehydrate.ts

  • commitRehydrated DROPS session=… (was transcriptStatus=…) — flags any key the only wholesale runtimes rebuild (out = {}) drops while a load is mid-flight.

How to use

  1. Build/run, then reproduce: start the app with a restored agent (startup) and/or continue a killed session (resume).
  2. Open the dev console and filter for [xcript-diag].
  3. The order tells the story — e.g. loading-set A → commitRehydrated DROPS A (was loading) → RESOLVE-DROPPED A confirms the rebuild orphans the loader; if instead RESOLVE-DROPPED A liveKeys=[A’] shows a different id, it's an id-remap race.
  4. Paste the [xcript-diag] lines back and I'll land the real fix at the source.

Tracks #283. Typecheck clean (4 pre-existing baseline errors only).

🤖 Generated with Claude Code

…ing drop

Temporary instrumentation (REMOVE once root cause is fixed). Logs every
transcriptStatus transition + the two resolve/error bail points where the
runtime entry is missing (the smoking gun) + any key commitRehydratedState
drops from its wholesale rebuild while mid-'loading'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant