Assistant text shown above a shell command is missing from the chat database when the command starts

Describe the Bug

A reply can show a paragraph and then run a shell command. The paragraph is on screen before the command starts. Reading state.vscdb at that moment often does not contain the paragraph yet. It shows up in the database later. Claude Code, Codex, and Copilot already save that paragraph before they start the command. Each one appends it to a per-chat .jsonl file, so a reader sees the paragraph as soon as the command starts.

Steps to Reproduce

  1. Ask for a long paragraph and then a shell command in the same reply.
  2. While the command is running, open state.vscdb.
  3. Read the text of the current assistant message.

Expected Behavior

The paragraph already visible above the command is stored before the shell process starts. Claude Code, Codex, and Copilot already do this by writing the paragraph to a per-chat .jsonl file before the command starts. For Cursor, flushing that reply’s text to the database at that moment is enough. A per-chat .jsonl file, one line for the paragraph before the command starts, is the same fix.

Operating System

MacOS

Version Information

IDE → 3.24.18

Additional Information

Opening the database already includes the WAL. The missing piece is a write of the text that is already on screen, done before the shell process starts. Claude Code, Codex, and Copilot each do that write before the shell process starts.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @EbadKhan,

You’re right, the chat database is saved in batches, so it can lag behind what’s on screen until the turn ends. It’s an internal store, so it isn’t a reliable place to read live output.

The supported route is Hooks, but today neither the hook payloads nor the transcript at transcript_path reliably have the text above a command at the moment it starts. It’s all there once the turn ends.

Saving that text before the command runs is a fair ask. We’ve let the team know and will keep an eye on this thread to gauge interest.