Usage
machine-memory update <id> <content> (--local|--remote)
machine-memory update <id,id,...> --from-file <path> (--local|--remote)
machine-memory update --match "unique topic" <content> (--local|--remote)Provide either one or more IDs or --match <query>, then provide inline
content or --from-file <path>. Updating multiple IDs returns the updated
rows, missing IDs, and a count.
Metadata
--tags, --context, --type, --certainty, --updated-by, --refs,
--evidence, and --validation-gaps replace the corresponding metadata;
omitted flags keep the stored values. --evidence none and
--validation-gaps none clear them. --expires-after-days <n|null> sets or
clears expiry.
Setting --certainty verified, or clearing the evidence of a verified memory,
requires at least one evidence kind (see add).
Memories saved before evidence existed keep their certainty with no evidence;
content-only updates to them still work, and doctor
lists them for review. The content update increments update_count and refreshes
updated_at.
--match must resolve to an active memory and cannot be combined with more
than one positional content argument.
Reconciliation
When the content changes, the response reports:
dropped: identifiers and sentences the new content no longer carries, as indiff.--dry-runreports them per target before anything is written.review_candidates: up to five other active memories that may rely on the old premise, withmatch_strength. A strong candidate names the same path or identifier. Update or deprecate each one, or confirm it still holds. Status memories do not trigger this check.
--json-min and --quiet keep dropped and list review_candidate_ids
instead of summaries; batch updates group both per ID under reconciliation.
add --upsert-match reports the same fields when it updates a strong match.
Updates save the previous row automatically. Use history and restore to review or recover an accidental overwrite without a prior read.
Embedding budget
Like add, update validates the composed embedding text before writing.
If the updated memory (new content plus retained or replaced metadata) would
exceed the 512-token limit — or the conservative byte+2 estimate — the update
fails with the exact byte or token deficit and no memory is changed. Preflight
with --dry-run to print a per-target size report without writing; it exits
1 when any target would be over budget:
machine-memory update 42 "replacement content" --dry-run --remote
# {"command":"update","dry_run":true,"count":1,
# "targets":[{"id":42,"size":{...}}]}Output flags: --brief prints {id, status} (plus tokens with
--token-report); --json-min/--quiet print {id} for single targets and
compact {updated_ids, not_found, count} payloads for batches.
Pass --token-report to include the breakdown on a successful update as
tokens (for a single target) or as a tokens array of
{id, ...breakdown} entries when updating multiple IDs.