Skip to content

fix: Conversation capture — catch any editNote error, fall through to create#24

Merged
phernandez merged 3 commits intomainfrom
claw/fix-conversation-capture
Feb 27, 2026
Merged

fix: Conversation capture — catch any editNote error, fall through to create#24
phernandez merged 3 commits intomainfrom
claw/fix-conversation-capture

Conversation

@bm-clawd
Copy link
Contributor

Fix

The previous indexConversation code tried to match specific error types (isNoteNotFoundError) to decide whether to fall back to writeNote. The error format from callTool didn't match the expected patterns, so writeNote never fired — zero conversations captured since alpha.13.

Change

try append → works? return
catch (any error) → fall through to create
try writeNote → creates note with Conversation schema frontmatter

No error type matching. Append works? Great. Doesn't? Create.

Also adds proper Conversation schema frontmatter (type: Conversation, date) to newly created notes.

Once basic-memory#614 lands

This entire method becomes one line: await this.editNote(title, 'append', entry) — BM handles create-on-miss.

Fixes #22

bm-clawd and others added 3 commits February 26, 2026 15:18
… create

The previous code matched specific error types (isNoteNotFoundError) to
decide whether to fall back to writeNote. The error format from callTool
didn't match, so writeNote never fired — zero conversations captured.

Fix: try append, if it fails for ANY reason, create the note. Also adds
Conversation schema frontmatter (type: Conversation, date) to created notes.

Fixes #22
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The indexConversation method now falls through to writeNote on any
editNote error, not just not-found errors. Updated test to expect
writeNote to be called on validation errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@phernandez phernandez merged commit 2675bce into main Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conversation capture: writeNote fallback never fires

2 participants