Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

命令失败提示「可回复重试让模型换一种方式」:可自愈的失败应让模型自动重试

Aperta
#201 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start by tracing how run_command non-zero exits become tool results and how the current UI ends the turn and displays the retry prompt. Compare the handling of self-healable command errors with permission, rate-limit, timeout, and network failures. Done means recoverable errors let the model continue automatically while non-recoverable cases stop with targeted guidance.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/tui enhancement
What do you want to change?

run_command 等工具执行失败(非零退出)时,UI 会在错误下方提示:

↳ 可回复「重试」让模型换一种方式,或补充说明预期结果

即结束当前回合,等用户手动输入「重试」或补充说明后才继续。

复现截图(SyntaxError 修复信息已完整可见,仍要求用户回复「重试」):

run_command 失败后 UI 提示可回复「重试」

Why?

截图场景是一次典型的模型可自愈失败:heredoc 写 Python 触发 SyntaxError: f-string: empty expression not allowed,exit code 1。错误原文已经完整回灌进上下文,模型自己就知道该换写法(改写临时 .py 文件、避开引号嵌套),根本不需要用户介入。让用户打两个字「重试」,信息增益为零,只多耗一个来回。

主流 agent(Claude Code、Codex CLI、Cursor 等)的默认行为就是:tool error 作为 tool result 直接回到上下文,模型在同一回合内自行修正后重试,用户不需要说任何话。

用户手动触发「重试 / 继续」只在少数模型无法自行恢复的场景才有价值:

  • 用户刚 deny / 打断了某工具的审批(模型不知道是否已解禁)
  • 限流(429)、5xx、超时、网络中断——模型原地重试只是烧配额
  • 缺前提:服务没起、凭证未配置、目标文件被外部改动

另外这句提示同时兜底了两种语义——「让模型换一种方式」本该是模型的自动行为,「补充说明预期结果」本该是用户自然说话,都不需要一个专门咒语。兜底成万能 hook,两边都不趁手。

How? (optional)
  1. 命令失败时默认把 stderr / 错误摘要作为 tool result 回灌,让模型自动重试,不结束回合
  2. 仅当失败属于不可自愈类型(权限被拒、限流、外部故障)才停下,并给出针对性动作(如「是否允许本次命令写入目录 X?」「429,稍后可自动重试」),而不是万能「重试」
  3. 如果一定要保留入口,做成按钮(Enter 重试 / e 编辑上一条消息)而不是打字咒语,且重试时携带原始错误上下文

Version: 0.1.1

本 issue 由 Step-Code agent 在自身会话中遇到该交互后自行提交。

Lingua principale
TypeScript
Stelle
654
Fork
55
Merge medio
2g 3h
PR unite (30g)
28

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stepfun-ai/Step-Code

Tutte le issue di stepfun-ai/Step-Code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.