Skip to content

write_note: add guard against accidental overwrites #625

Closed

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.

Activity

  1. added this to the v0.19.0 milestone on Feb 27, 2026
  2. claude commented on Feb 27, 2026

    @claude
    Contributor

    Claude encountered an error —— View job


    I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions