Cannot create stateless Cron #384

Open
opened 2026-02-15 18:16:22 -05:00 by yindo · 0 comments
Owner

Originally created by @amitchaudharyc on GitHub (Nov 26, 2025).

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangGraph.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangGraph.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package).

Example Code

  const cronResponse = await client.crons.create(assistantId, {
    schedule: cronSchedule,
    input: {
      messages: [
        {
          type: "human",
          content: taskData.prompt,
        },
      ],
    },
    metadata: {
      scheduledTaskTitle: taskData.title,
      userId,
      accountId,
    },
  });

Error Message and Stack Trace (if applicable)

[0] Failed to create scheduled task: HTTPError: HTTP 400: {"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["thread_id"],"message":"Required"}],"name":"ZodError"}}
[0] at HTTPError.fromResponse (/app/node_modules/@langchain/langgraph-sdk/src/utils/async_caller.ts:78:14)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async (/app/node_modules/@langchain/langgraph-sdk/src/utils/async_caller.ts:149:23)
at async RetryOperation._fn (/app/node_modules/p-retry/index.js:50:12) {
status: 400,
text: '{"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["thread_id"],"message":"Required"}],"name":"ZodError"}}',
response: undefined,
attemptNumber: 1,
retriesLeft: 4
}

Description

I am using Langgraph SDK 1.0.2 version. When I execute below code, it asks me to pass threadId even though I am trying to create stateless one. I tried the direct api also, and that too replies with Zod error.

Also there is another issue where in the docs it is clearly written that we can pass agent name "agent" to assistantId, but ZodErrror suggests it accepts only UUID.

System Info

I am using NPM

Originally created by @amitchaudharyc on GitHub (Nov 26, 2025). ### Checked other resources - [x] I added a very descriptive title to this issue. - [x] I searched the LangGraph.js documentation with the integrated search. - [x] I used the GitHub search to find a similar question and didn't find it. - [x] I am sure that this is a bug in LangGraph.js rather than my code. - [x] The bug is not resolved by updating to the latest stable version of LangGraph (or the specific integration package). ### Example Code const cronResponse = await client.crons.create(assistantId, { schedule: cronSchedule, input: { messages: [ { type: "human", content: taskData.prompt, }, ], }, metadata: { scheduledTaskTitle: taskData.title, userId, accountId, }, }); ### Error Message and Stack Trace (if applicable) [0] Failed to create scheduled task: HTTPError: HTTP 400: {"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["thread_id"],"message":"Required"}],"name":"ZodError"}} [0] at HTTPError.fromResponse (/app/node_modules/@langchain/langgraph-sdk/src/utils/async_caller.ts:78:14) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async <anonymous> (/app/node_modules/@langchain/langgraph-sdk/src/utils/async_caller.ts:149:23) at async RetryOperation._fn (/app/node_modules/p-retry/index.js:50:12) { status: 400, text: '{"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["thread_id"],"message":"Required"}],"name":"ZodError"}}', response: undefined, attemptNumber: 1, retriesLeft: 4 } ### Description I am using Langgraph SDK 1.0.2 version. When I execute below code, it asks me to pass threadId even though I am trying to create stateless one. I tried the direct api also, and that too replies with Zod error. Also there is another issue where in the docs it is clearly written that we can pass agent name "agent" to assistantId, but ZodErrror suggests it accepts only UUID. ### System Info I am using NPM
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#384