[Bug]: Cursor shell commands never stream live output

未关闭 适合新手
#30,228 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
backend

调研方向

从 packages/provider-cursor/src/server/adapter.ts 开始:shellOutputText (~L1975) 未处理 Cursor 的 protobuf oneof 形式 ({ case: 'stdout', value: { data } }),因此 shell-output-delta (~L2048) 会提前返回,不会发出任何 command_output.delta。使用报告中的五行 shell 循环复现,并观察完成前是否有增量输出。完成标准是 stdout/stderr 像 Codex/Claude 一样逐步流式传输,并通过 provider 流式测试进行检查。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
13 小时 48 分钟
30 天内合并 PR
208

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。