fix(cli): support --query flag in memory search command#25904
Closed
niceysam wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(cli): support --query flag in memory search command#25904niceysam wants to merge 1 commit intoopenclaw:mainfrom
niceysam wants to merge 1 commit intoopenclaw:mainfrom
Conversation
The help text for 'openclaw memory search' shows an example using --query but the subcommand only accepted a positional argument, causing 'error: unknown option --query' for anyone who followed the docs. Accept both forms now: - openclaw memory search "deployment notes" (positional, unchanged) - openclaw memory search --query "deployment notes" (new flag) When neither is provided, a clear error message is emitted instead of a silent no-op. Fixes openclaw#25857
niceysam
commented
Feb 25, 2026
This was referenced Feb 25, 2026
steipete
added a commit
that referenced
this pull request
Feb 25, 2026
Contributor
|
Reviewed and reimplemented on What shipped:
Validation:
Thanks for the report and patch, @niceysam. |
Contributor
|
Landed on main in 559b5ea; closing in favor of landed commit. |
joshavant
pushed a commit
that referenced
this pull request
Feb 25, 2026
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
Jackson3195
pushed a commit
to Jackson3195/openclaw-with-a-personal-touch
that referenced
this pull request
Feb 25, 2026
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
2 tasks
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Feb 27, 2026
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
thebenjaminlee
pushed a commit
to escape-velocity-ventures/openclaw
that referenced
this pull request
Mar 7, 2026
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.
The help text has always shown
--queryas the way to pass a search term:But the subcommand only registered a positional argument, so anyone following the docs got:
This change makes both forms work:
openclaw memory search "deployment notes"(positional — unchanged, still works)openclaw memory search --query "deployment notes"(flag — now accepted)If neither is provided, a clear error message is emitted. The implementation resolves the query with
queryArg ?? opts.query, so the two forms are fully equivalent.Closes #25857
Greptile Summary
Adds support for the
--queryflag in theopenclaw memory searchcommand, matching the documented help text. The implementation correctly makes both forms equivalent: positional argument (openclaw memory search "term") and flag-based (openclaw memory search --query "term"). The code properly validates that at least one form is provided.Confidence Score: 5/5
Last reviewed commit: 81e9c87