Skip to content

fix(output): show quiet usage metadata#274

Merged
steipete merged 1 commit into
mainfrom
fix/quiet-usage-metadata
Apr 25, 2026
Merged

fix(output): show quiet usage metadata#274
steipete merged 1 commit into
mainfrom
fix/quiet-usage-metadata

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Fixes #257.

Quiet output still writes only assistant text to stdout, but now emits final ACP prompt-result usage/cost metadata to stderr when adapters provide it. This keeps the pipe contract intact while making token/cost accounting observable.

Local proof:

  • fnm exec --using=24.15.0 corepack [email protected] run build:test
  • fnm exec --using=24.15.0 node --test dist-test/test/output.test.js
  • fnm exec --using=24.15.0 corepack [email protected] run check (572 tests)

@cursor

cursor Bot commented Apr 25, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Low risk: changes are limited to CLI quiet-mode formatting and add optional stderr output for final prompt metadata without affecting stdout piping behavior.

Overview
Quiet output mode now still writes assistant text only to stdout, but additionally emits final ACP usage token counts and cost metadata to stderr when present in the session/prompt result.

This threads a stderr writer through createOutputFormatter, adds robust parsing/formatting for multiple usage/cost field shapes, and extends tests to assert the new stderr metadata lines.

Reviewed by Cursor Bugbot for commit 79df228. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

feat: QuietOutputFormatter silently discards token usage — emit to stderr

1 participant