fix: suppress "Run doctor --fix" hint when already in fix mode with no changes#24666
Merged
steipete merged 1 commit intoopenclaw:mainfrom Feb 24, 2026
Merged
Conversation
…o changes When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566
steipete
approved these changes
Feb 24, 2026
Contributor
steipete
left a comment
There was a problem hiding this comment.
Reviewed for correctness and simpler alternatives; this is the best scoped change for the issue.
sagarsaija
pushed a commit
to sagarsaija/openclaw
that referenced
this pull request
Feb 24, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
kevinWangSheng
pushed a commit
to kevinWangSheng/openclaw
that referenced
this pull request
Feb 26, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
kevinWangSheng
pushed a commit
to kevinWangSheng/openclaw
that referenced
this pull request
Feb 26, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
2 tasks
mylukin
pushed a commit
to mylukin/openclaw
that referenced
this pull request
Feb 26, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
6 tasks
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 1, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]> (cherry picked from commit ae281a6)
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 3, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]> (cherry picked from commit ae281a6) # Conflicts: # src/commands/doctor.ts
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…o changes (openclaw#24666) When running `openclaw doctor --fix` and no config changes are needed, the else branch unconditionally showed "Run doctor --fix to apply changes" which is confusing since we just ran --fix. Now the hint only appears when NOT in fix mode (i.e. when running plain `openclaw doctor`). When in fix mode with nothing to change, the command silently proceeds to the "Doctor complete." outro. Fixes openclaw#24566 Co-authored-by: User <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openclaw doctor --fixshows "Run doctor --fix to apply changes" even when there are no pending changes, which is confusing.--fixsee a hint telling them to run the same command again, implying something is broken.!prompter.shouldRepairguard so the hint only appears when running plaindoctor(without--fix).--fixrepair logic, and the "Doctor complete." outro are all untouched.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
openclaw doctor --fixwith no config changes needed, the misleading "Run doctor --fix to apply changes" message is no longer shown. The command proceeds silently to "Doctor complete."openclaw doctor(without--fix) and changes are detected, the hint is still shown as before.Security Impact (required)
Repro + Verification
Environment
Steps
openclaw doctor --fixwhen config is already up to dateExpected
Actual (before fix)
Evidence
else→else if (!prompter.shouldRepair))Human Verification (required)
prompter.shouldRepairistruewhen--fixis passed,falseotherwise.doctor(no --fix) still shows the hint when changes exist.--fixwith actual changes still writes config.Compatibility / Migration
Failure Recovery (if this breaks)
else ifback toelse)src/commands/doctor.tsdoctorwith pending changes)Risks and Mitigations
prompter.shouldRepairis somehow undefined/falsy in an unexpected path, the hint could be suppressed incorrectly.shouldRepairis always set to a boolean increateDoctorPrompter(line 32 of doctor-prompter.ts). No code path leaves it unset.Greptile Summary
Prevents confusing "Run doctor --fix" hint from appearing when user already ran
openclaw doctor --fixwith no changes needed. The fix adds a guard checking!prompter.shouldRepairto line 298 so the hint only displays during plaindoctorruns (without--fix), not when already in fix mode.Confidence Score: 5/5
prompter.shouldRepairflag that's always set to a boolean value increateDoctorPrompter. The logic is sound: whenshouldWriteConfigis false and we're NOT in repair mode, show the hint; when in repair mode, skip the hint. No risk of breaking existing functionality.Last reviewed commit: c53f54a