feature request: Checkpoint Postgres delete thread #280

Closed
opened 2026-02-15 18:15:27 -05:00 by yindo · 1 comment
Owner

Originally created by @hamuk on GitHub (Jun 10, 2025).

Somewhat related to #1138

There is no way to delete threads from the checkpointer without having to run the SQL against the tables manually (as mentioned #227 here) e.g.:

pool.query("DELETE FROM checkpoints WHERE thread_id = $1", [threadId]),
pool.query("DELETE FROM checkpoint_blobs WHERE thread_id = $1", [threadId]),
pool.query("DELETE FROM checkpoint_writes WHERE thread_id = $1", [threadId]),

This is an issue if the library changes the database structure in a future update.

Ideally it'd be nice to be able to do:

const checkpointer = new PostgresSaver(
  pool,
  undefined,
  {
    schema: "langgraph",
  },
);

checkpointer.delete(threadId);

or potentially:

const config = {
  configurable: {
    thread_id: threadId,
  },
};

this.graph.deleteState(config);

Many thanks!

Originally created by @hamuk on GitHub (Jun 10, 2025). Somewhat related to #1138 There is no way to delete threads from the checkpointer without having to run the SQL against the tables manually (as mentioned [#227](https://github.com/langchain-ai/langgraphjs/issues/227#issuecomment-2403725502) here) e.g.: ``` pool.query("DELETE FROM checkpoints WHERE thread_id = $1", [threadId]), pool.query("DELETE FROM checkpoint_blobs WHERE thread_id = $1", [threadId]), pool.query("DELETE FROM checkpoint_writes WHERE thread_id = $1", [threadId]), ``` This is an issue if the library changes the database structure in a future update. Ideally it'd be nice to be able to do: ``` const checkpointer = new PostgresSaver( pool, undefined, { schema: "langgraph", }, ); checkpointer.delete(threadId); ``` or potentially: ``` const config = { configurable: { thread_id: threadId, }, }; this.graph.deleteState(config); ``` Many thanks!
yindo added the enhancement label 2026-02-15 18:15:27 -05:00
yindo closed this issue 2026-02-15 18:15:27 -05:00
Author
Owner

@dqbd commented on GitHub (Sep 9, 2025):

deleteThread method has become part of Checkpointer API since 0.4.x!

@dqbd commented on GitHub (Sep 9, 2025): `deleteThread` method has become part of Checkpointer API since 0.4.x!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#280