Skip to content

fix(cli): suppress redundant --output suggestion when already using --output#1775

Closed
latenighthackathon wants to merge 1 commit into
NVIDIA:mainfrom
latenighthackathon:fix/debug-output-suggestion
Closed

fix(cli): suppress redundant --output suggestion when already using --output#1775
latenighthackathon wants to merge 1 commit into
NVIDIA:mainfrom
latenighthackathon:fix/debug-output-suggestion

Conversation

@latenighthackathon

@latenighthackathon latenighthackathon commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Summary

nemoclaw debug --output no longer shows a redundant "run with --output" suggestion after already writing the tarball.

Problem

Running nemoclaw debug --output /tmp/debug.tar.gz writes the tarball successfully, then prints:

Done. If filing a bug, run with --output and attach the tarball to your issue:
  nemoclaw debug --output /tmp/nemoclaw-debug.tar.gz

The user already used --output -- the suggestion is redundant and confusing.

Fix

Condition the completion message on whether output was provided. When --output was used, show "Tarball written. Attach it to your bug report." When not, show the existing suggestion.

Test plan

  • npm run build:cli passes
  • npm run typecheck:cli passes

Closes #1732

Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com

Summary by CodeRabbit

  • Bug Fixes
    • Debug output messages now correctly adapt based on whether an output file is specified. When output is provided, confirmation of the tarball write is displayed. When omitted, usage guidance with the default output path is shown.

nemoclaw debug --output already writes a tarball, but the completion
message still says 'run with --output and attach the tarball'. Show
a shorter 'Tarball written' message when --output was provided, and
only suggest --output when it was not.

Closes NVIDIA#1732

Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b4081813-b552-4c96-94fb-3511dfdfb1b0

📥 Commits

Reviewing files that changed from the base of the PR and between 035144e and 08f985b.

📒 Files selected for processing (1)
  • src/lib/debug.ts

📝 Walkthrough

Walkthrough

The runDebug() function in src/lib/debug.ts was modified to conditionally tailor its final console output. When the output option is provided, it reports the tarball location without suggesting to rerun the command with --output. When output is absent, it preserves the existing instruction to rerun with the output flag.

Changes

Cohort / File(s) Summary
Debug Output Logic
src/lib/debug.ts
Modified runDebug() to conditionally format the completion message based on whether output option is set, eliminating redundant rerun suggestions when output is already specified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A debug message, twice told wrong,
"Use --output!"—redundant song,
But now logic's wise and true,
No repeat when it's already used! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and accurately describes the main change: suppressing the redundant --output suggestion when the user already provides the --output flag.
Linked Issues check ✅ Passed The code changes in src/lib/debug.ts directly address issue #1732 by conditionally displaying the 'run with --output' suggestion only when --output is not provided.
Out of Scope Changes check ✅ Passed All changes in src/lib/debug.ts are directly related to the objective of fixing the redundant --output suggestion behavior described in issue #1732.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@wscurran wscurran added bug Something fails against expected or documented behavior NemoClaw CLI labels Apr 13, 2026
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this PR, which proposes a fix for a bug where the debug output message shows a redundant suggestion to run with --output even when --output is already used.


Possibly related open issues:

@cv cv added the v0.0.18 label Apr 16, 2026
@prekshivyas prekshivyas self-assigned this Apr 16, 2026

@prekshivyas prekshivyas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix — simple conditional on output, no regressions. CI green. @latenighthackathon pls update branch and we can get this in

@latenighthackathon

Copy link
Copy Markdown
Contributor Author

@prekshivyas @wscurran Closing this — the fix landed in main via the getDebugCompletionMessages(output) refactor (returns [] when --output is set, which suppresses the redundant suggestion). Our change conflicts with the new code path and is no longer needed.

Cheers!

@latenighthackathon

Copy link
Copy Markdown
Contributor Author

Superseded by upstream refactor — getDebugCompletionMessages already handles this case.

@latenighthackathon latenighthackathon deleted the fix/debug-output-suggestion branch April 23, 2026 12:19
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: observability Logging, metrics, tracing, diagnostics, or debug output bug-fix PR fixes a bug or regression and removed NemoClaw CLI bug Something fails against expected or documented behavior labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: observability Logging, metrics, tracing, diagnostics, or debug output bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms] nemoclaw debug --output shows redundant "run with --output" suggestion after already using --output

4 participants