Skip to content

SDK: getDialogue(id) returns undefined for a dialogue that was just created #90

Description

@dialoguedb-bot

Source

Daily user testing — 2026-06-17
Persona: Blessing Okonkwo — 20-year-old CS student, building a hackathon chatbot project

Finding

After creating a dialogue with db.createDialogue(), calling db.getDialogue(dialogueId) with the returned ID returns undefined.

Reproduction:

import { DialogueDB } from "dialogue-db"
const db = new DialogueDB({ apiKey: "skv1_..." })

const dialogue = await db.createDialogue({
  messages: [{ role: "user", content: "Hello" }],
  namespace: "student-001"
})
console.log("Created:", dialogue.id) // "01KVAPCXD5TAHFWGT7VABE4ZFQ"

const fetched = await db.getDialogue(dialogue.id)
console.log("Fetched:", fetched) // undefined

The dialogue IS retrievable via searchDialogues(), confirming it exists. loadMessages() on the original dialogue object also works. Only getDialogue() fails.

Tested with db.getDialogue("01KVAPCXD5TAHFWGT7VABE4ZFQ") (string ID) — returns undefined.
Tested with db.getDialogue({ dialogueId: "..." }) — throws "Invalid id: must be a string".

Impact

This breaks the basic read-after-write CRUD pattern. A developer who creates a dialogue, stores the ID, and later wants to retrieve it cannot do so. This is especially confusing for new users evaluating the product — it makes the database appear to lose data.

Combined with the listDialogues returning empty results, a developer cannot retrieve their own data except through the original dialogue object or via search. This severely undermines trust.

Suggested fix

Ensure getDialogue(id) correctly returns a dialogue that was recently created. If there's an eventual consistency delay, return a clear error or status indicator rather than undefined.


Automated from daily user testing


Dispatched from dialoguedb/hq#370

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions