Skip to content

Governance delete finds a captured observation but deletes nothing (deleted:0) #1273

Description

@bgl-gh-kimi

Bug (v0.9.29)

Deleting a captured observation via the governance API reports a match but removes nothing.

Repro

# 1. find the observation (works)
curl -s -X POST http://127.0.0.1:3111/agentmemory/governance/memories   -H "Authorization: Bearer $SECRET" -H 'Content-Type: application/json'   -d '{"query":"favorite color","type":"observation","agentId":"*"}'
# -> {"total":1,"memories":[...]} — the observation IS found

# 2. delete it
curl -s -X DELETE http://127.0.0.1:3111/agentmemory/governance/memories   -H "Authorization: Bearer $SECRET" -H 'Content-Type: application/json'   -d '{"query":"favorite color","type":"observation","agentId":"*"}'
# -> {"deleted":0}

The mcp__episodes__memory_governance_delete tool behaves the same: the tool output itself shows total:1 for the find step, then deleted:0.

Expected

Either the observation is actually deleted, or the API returns an explicit error/unsupported-status explaining why a matched captured observation cannot be removed (and what the supported path is).

Context

We auto-capture every assistant turn as observations. A wrong answer got captured and outranks the correct memory in smart-search. We need a way to invalidate bad captures — currently impossible through any API surface we could find (deletes appear to work only for lessons and slots). This is the forcing function for the feature request in the companion issue: first-class deprecate/supersede with an audit trail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions