Skip to content

write_note: add guard against accidental overwrites #625

@bm-clawd

Description

@bm-clawd

Problem

write_note silently overwrites existing notes with the same title. This is dangerous for agents that accumulate content in files (daily notes, logs, journals). An agent calling write_note on a file that already exists loses all prior content.

Real-world example: an agent ran write_note on a daily memory file during reflection, destroying a full day of accumulated notes.

Proposal

Add an optional overwrite parameter (default: true for backwards compat):

  • overwrite: true — current behavior (create or replace)
  • overwrite: false — error if the note already exists

Alternatively, or additionally:

  • mode: "create" | "update" | "upsert" for more granular control
  • Return a warning/diff when overwriting a note that has changed since last read

Workaround

Agents should use edit_note with operation: "append" for any file that accumulates content. But the footgun remains for any agent that doesn't know this.

Context

The MCP write_note tool is the most natural first choice for agents — it's what they reach for. Making the destructive path require explicit opt-in would prevent data loss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions