[Bug]: Cursor shell commands never stream live output

Open Beginner friendly
#30,228 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start in packages/provider-cursor/src/server/adapter.ts: shellOutputText (~L1975) misses Cursor's protobuf oneof shape ({ case: 'stdout', value: { data } }), so shell-output-delta (~L2048) returns early and no command_output.delta is emitted. Reproduce with the five-line shell loop from the report and watch for deltas before completion. Done means stdout/stderr stream incrementally like Codex/Claude, checked with a provider streaming test.

Written by the indexing model from the issue text.

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Steps to reproduce
  1. Use the Cursor provider (@cursor/sdk 1.2.0) and start a turn.
  2. Ask the agent to run a command that prints over several seconds, e.g. for i in 1 2 3 4 5; do echo "tick $i"; sleep 2; done.
  3. Expand the command row while the command is still running.
Expected behavior

Output appears incrementally while the command runs, the same way it does for Codex and Claude Agent. The expanded row should show tick 1, tick 2, … as they are printed.

Actual behavior

The expanded command row stays empty for the whole run. The complete output appears at once when the tool call finishes, so a long command looks hung.

This affects every Cursor shell command, including a real ~3 minute remote deploy where the whole log landed only at completion.

Impact

Major degradation or frequent failure

Version or commit

main @ cefb544af3 (also reproduced on 0.1.7-nightly.20261103.4119)

Environment

Linux, web client, Cursor provider via @cursor/sdk 1.2.0, default Cursor model, local mode.

Logs or stack traces

Redacted reproduction log. The command emits 5 lines over ~10s; T3 shows nothing until the end.

[12:00:00] INFO  running command
[12:00:10] INFO  command finished (5 lines of stdout)

# T3 UI while running: command row expanded, no output
# T3 UI after completion: all 5 lines appear at once

Root cause is in the adapter, not the transport. Cursor sends the delta as a protobuf oneof:

{ "case": "stdout", "value": { "data": "tick 1\n" } }
{ "case": "stderr", "value": { "data": "" } }
{ "case": "exit",   "value": { "code": 0, "aborted": false } }

packages/provider-cursor/src/server/adapter.ts (shellOutputText, ~L1975) only looks at
event.text, event.output, event.data, event.stdout, event.stderr, event.chunk, so it
returns "". shell-output-delta (~L2048) then returns early at:

const chunk = shellOutputText(update.event);
if (chunk.length === 0) return;

So command_output.delta is never emitted for Cursor, while the final output still arrives through
the completion fallback in emitToolArtifacts (cursorToolOutputText(toolCall) || streamedOutput).

The SDK does stream live: @cursor/sdk dist/esm/336.js runs handleShellStream concurrently with
the tool call and sends one shellOutputDelta update per stdout/stderr chunk.

Workaround

Run the command outside T3 (terminal/ssh) and paste the result, or keep the row collapsed and wait
for the completion output.

Dominant language
TypeScript
Stars
24.8k
Forks
6.4k
Avg merge
7h 39m
Merged PRs (30d)
123

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.