components C9: '#' memory-append shortcut - #301
Merged
Conversation
A prompt starting with '#' saves a note to a chosen memory file instead of starting an agent turn: repl routing (precedence /, !, #; bare '#' falls through) -> MemorySaveScreen over the /memory target hierarchy (build_memory_options, promoted to a public shared API so the two pickers can never drift) -> services/memory_append.py. Honesty note (documented in the plan, gap doc, and module docstring): the vendored TS snapshot ships only the RENDERER (UserMemoryInputMessage.tsx - '#' row + random "Got it. / Good to know. / Noted.") and the selector; no '#' detection or append exists there. TS-verbatim pieces are ported verbatim (acknowledgement trio, "Cancelled memory editing", target hierarchy); the connective glue is explicitly port-derived: ensure-create + single-newline separation + '- ' bullet unless the note supplies its own punctuation; every failure/cancel path restores '#note' into the prompt so nothing typed is lost; notes are recorded in prompt history like '!' commands. Critic: APPROVE (3 MINOR / 4 NIT, all applied: docstring precision, history recording, enumeration-failure test, ValueError guard, UIOption typing, public build_memory_options). 17 tests; full suite baseline-identical. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
singlaamitesh
pushed a commit
to singlaamitesh/clawcodex
that referenced
this pull request
Jul 7, 2026
…-memory-shortcut components C9: '#' memory-append shortcut
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
#saves a note to a chosen memory file instead of starting an agent turn: repl routing (precedence/,!,#; bare#falls through to the agent) →MemorySaveScreenover the/memorytarget hierarchy (build_memory_optionspromoted to a public shared API so the two pickers can never drift) →services/memory_append.py.UserMemoryInputMessage.tsx—#row + random "Got it. / Good to know. / Noted.") and the selector — no#detection or append exists in it. TS-verbatim pieces are ported verbatim (acknowledgement trio, "Cancelled memory editing", target hierarchy); the connective glue is explicitly port-derived: ensure-create, single-newline separation,-bullet unless the note supplies its own punctuation.#noteinto the prompt (nothing typed is lost — deliberate, don't revert as "extra"); notes are recorded in prompt history like!commands; no agent turn consumed.Test plan
#intercepts stripped, bare#falls through,!unaffected), app flow (cancel/success/write-failure/enumeration-failure rows + restore, history recording)🤖 Generated with Claude Code