Skip to content

PATCH /memories/{id} returns 400 when updating 'pinned' field #175

@chrisbaker2000

Description

@chrisbaker2000

Description

When attempting to update the pinned field on an existing memory via PATCH /v1/long_term_memory/memories/{memory_id}, the server returns HTTP 400.

Steps to Reproduce

  1. Create a memory with pinned: false (or omit pinned)
  2. Attempt to PATCH with {"pinned": true}
curl -X PATCH "https://your-server/v1/long_term_memory/memories/<id>?namespace=default" \
  -H "Content-Type: application/json" \
  -d '{"pinned": true}'

Expected: 200 OK, memory updated with pinned: true
Actual: 400 Bad Request

Impact

  • Cannot promote existing memories to pinned status after creation
  • Workaround requires creating a new pinned memory and deleting the original, which changes the memory ID and loses metadata (created_at, access history, etc.)
  • Affects automated curation workflows that identify important memories post-creation

Environment

  • Server version: 0.13.2
  • Tested via direct HTTP API calls

Suggested Fix

The PATCH endpoint's request validation likely doesn't include pinned in the allowed update fields. Adding it to the update schema should resolve this.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions