Skip to content

feat(cli): O99 show real progress during long runs (wired to O98) - #96

Merged
QiaolongLi1201 merged 3 commits into
mainfrom
fix/o99-progress-v2
Oct 11, 2026
Merged

QiaolongLi1201 merged 3 commits into
mainfrom
fix/o99-progress-v2

Conversation

@QiaolongLi1201

Copy link
Copy Markdown
Collaborator

Summary

O99 — show real progress during long runs so users do not think Moss is hung and hit Ctrl+C.

  • Emit real progress at least every 60s on TUI and --print (stderr only for print; stdout keeps the final answer).
  • Sources (priority): tool start/end summaries → long-tool tool_progress heartbeats → thinking-wait lines (正在推理,已等待 Ns / English equivalent) when the model is silent ≥30s.
  • Map existing Mini tool_execution_progress into MossAgentEvent.tool_progress (previously dropped).
  • No empty working… / rotating slogans; identical lines do not stack ≥3 times.
  • Display only — does not change src/safety, tool scheduling, or default permissions.

O98 (#94) is on main and wired

#94 merged to main as adf2d987. This branch is rebased onto that tip (fix/o99-progress-v2, replaces #95 head fix/o99-progress to avoid force-push).

Progress-path unfinished/completion footer now read-only consumes O98:

  • resolveRunOutcome + formatOutcomeLine from src/cli/run-outcome.ts
  • Statuses: completed | incomplete | verify_failed | blocked | unverified
  • formatOutcomeLine always non-empty (完成:… / Incomplete: / 未完成:… / …)
  • Tracker: noteRunCompletionEvent inside the progress tracker; helpers resolveProgressOutcome / formatProgressOutcomeLine in src/cli/run-progress.ts
  • Exit codes remain owned by oneshot’s O98 resolveRunOutcome (unfinished → non-0; no half-progress + exit 0)
  • --print progress stays on stderr; stdout final answer (+ O98 conclusion line from oneshot)

Do not treat progress heartbeats as a success signal.

Test plan

  • node --test test/o99-progress.spec.mjs test/run-completion-o98.spec.mjs → 14/14 pass (13 O99 + O98 suite)
  • Related: cli-output + output-renderer-edit-diff + cli-headless-json-contract + oneshot-cancellation → 4/4 pass
  • npm run check (format / lint / typecheck) → green
  • Prior revert-red on heartbeat (pre-wire): 1 pass / 12 fail when O99 src removed
  • Full npm test / CI
  • UX: O90 same prompt under --print ≥5 min, stderr 60s window check (post-merge)

Files

File Role
src/cli/run-progress.ts Progress module; O98 footer via formatOutcomeLine
src/cli/output.ts text --print tracker; unfinished last line uses formatProgressOutcomeLine
src/cli/oneshot.ts json/stream-json stderr progress + O98 exit/conclusion (from main)
src/cli/print.ts tool_progress → no stdout events
src/cli/tui/transcript.ts Real progress copy; drop rotating verbs
src/cli/tui/render-bridge.ts tool_progress refreshes toolLine
src/core/agent/moss-agent-types.ts tool_progress event
src/core/agent/moss-agent-loop-adapter.ts Map tool_execution_progress
test/o99-progress.spec.mjs Directed red/green tests (O98 prefixes)

Base: adf2d987 (post-O98 #94). Head: 4a818669. No src/safety changes. Do not merge until QA/UX sign.

Supersedes #95 (fix/o99-progress @ 0e3ef243).

Emit real progress at least every 60s on TUI and --print (stderr only):
tool start/end summaries, long-tool heartbeats via tool_progress, and
thinking-wait lines. Map existing tool_execution_progress heartbeats;
no empty working… slogans; unfinished runs get a clear last line on the
progress path (full false-success exit-code gate depends on O98/#94).
Display only — no safety/scheduling change.
Live spinner now shows the in-flight tool summary instead of Working….
Update tui-run-state and tui-shell assertions; narrow panes may clip
token/queue tails after the tool line.
Consume resolveRunOutcome + formatOutcomeLine on the progress path
(no second outcome vocabulary). Unfinished stopReasons → Incomplete/
未完成 via O98; honest complete → non-empty 完成/Completed. Exit codes
remain owned by oneshot's O98 resolveRunOutcome (now on main).
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@QiaolongLi1201
QiaolongLi1201 merged commit c71cd08 into main Oct 11, 2026
7 of 12 checks passed
@QiaolongLi1201
QiaolongLi1201 deleted the fix/o99-progress-v2 branch October 12, 2026 10:29
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.

1 participant