Skip to content

fix(sessions): preserve queued notes and resolve dialogs and tools correctly - #24

Open
thecodacus wants to merge 2 commits into
mainfrom
fix/issue-8-session-correctness
Open

thecodacus wants to merge 2 commits into
mainfrom
fix/issue-8-session-correctness

Conversation

@thecodacus

@thecodacus thecodacus commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Six findings from #8 remain reproducible on current main; the ensureClient single-flight launch guard is already present and is preserved.

Answered extension dialogs now clear their timeout and abort listener; late cancellations are matched by dialog ID. Channel role/context updates run inside the serialized turn queue, after the previous run settles. Deliberate disposal no longer emits a fabricated crash or lets an old exit handler remove a replacement client.

Queued note prompts are prepared only when their turn starts, and the exact note IDs are consumed only after prompt acceptance. Model-only config changes keep the session's provider. Tool completion matches toolCallId, and rejected/expired dialog responses remain visible with an error instead of silently closing.

Validation: server and web production builds; regression tests for answered timers, out-of-order same-name tools, deferred queue preparation, note consumption after acceptance, failed startup preserving notes, plus existing prompt-acceptance tests.

Fixes #8.

Documentation: explains queued channel turns, pending-note retention, and retrying extension questions.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 113075e0-84a2-40fe-8262-209b71ad4b3d

📥 Commits

Reviewing files that changed from the base of the PR and between 0dcb312 and 92aa3a0.

📒 Files selected for processing (10)
  • docs/guide/sessions.md
  • server/src/channels/supervisor.ts
  • server/src/db.ts
  • server/src/index.ts
  • server/src/pi/sdk-client.ts
  • server/src/session-manager.ts
  • tests/issue8-correctness.test.mts
  • web/src/api.ts
  • web/src/components/ExtensionDialog.tsx
  • web/src/transcript.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Correctness audit: duplicate-process race, dialog timer leak, and 5 more (multi-day deep dive)

1 participant