can not use langgraph studio chat mode when i build the typescript to js using rsbuild #339

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

Originally created by @candy-Tong on GitHub (Aug 13, 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

Image Image

Error Message and Stack Trace (if applicable)

No response

Description

The message state can not Identify as a message key,and can not change to chat mode

System Info

mac
node 18
pnpm

Originally created by @candy-Tong on GitHub (Aug 13, 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 <img width="849" height="887" alt="Image" src="https://github.com/user-attachments/assets/b26cc302-8959-4d0e-a1e8-cad2323067bb" /> <img width="1610" height="1454" alt="Image" src="https://github.com/user-attachments/assets/d4958110-aadc-4a05-b323-a3950801c7cf" /> ### Error Message and Stack Trace (if applicable) _No response_ ### Description The message state can not Identify as a message key,and can not change to chat mode ### System Info mac node 18 pnpm
Author
Owner

@Bananafly commented on GitHub (Aug 31, 2025):

I have the same problem!

@Bananafly commented on GitHub (Aug 31, 2025): I have the same problem!
Author
Owner

@LaysDragon commented on GitHub (Nov 27, 2025):

for some reason if I create template project by pnpm create langgraph. the chat mode is enable and the message box can select the message type.
the version of template project is.

    "@langchain/core": "^0.3.57",
    "@langchain/langgraph": "^0.3.0"
Image Image

once I update the version to least the chat mode disabled and the message box fallback to array mode

    "@langchain/core": "^1.1.0",
    "@langchain/langgraph": "^1.0.2",
Image Image

I think it must related to package version here, seems like LangChain studio is outdated and isnt complete support the new version schema of latest langchain package.

@LaysDragon commented on GitHub (Nov 27, 2025): for some reason if I create template project by `pnpm create langgraph`. the chat mode is enable and the message box can select the message type. the version of template project is. ``` "@langchain/core": "^0.3.57", "@langchain/langgraph": "^0.3.0" ``` <img width="744" height="117" alt="Image" src="https://github.com/user-attachments/assets/1283e159-1ff2-4eb3-be0b-068764b892b7" /> <img width="1157" height="605" alt="Image" src="https://github.com/user-attachments/assets/927f666d-ca62-415a-8575-edf277d6ba63" /> once I update the version to least the chat mode disabled and the message box fallback to array mode ``` "@langchain/core": "^1.1.0", "@langchain/langgraph": "^1.0.2", ``` <img width="1220" height="133" alt="Image" src="https://github.com/user-attachments/assets/99a96250-7da2-4eeb-8bd8-3b54038c4f2f" /> <img width="1148" height="399" alt="Image" src="https://github.com/user-attachments/assets/53349d71-bbc8-4018-8342-aae35bbafc80" /> I think it must related to package version here, seems like LangChain studio is outdated and isnt complete support the new version schema of latest langchain package.
Author
Owner

@kiralpoon commented on GitHub (Dec 11, 2025):

Same problem and it makes no sense to downgrade....
"@langchain/core": "^1.1.0",
"@langchain/langgraph": "^1.0.2"

@kiralpoon commented on GitHub (Dec 11, 2025): Same problem and it makes no sense to downgrade.... "@langchain/core": "^1.1.0", "@langchain/langgraph": "^1.0.2"
Author
Owner

@LaysDragon commented on GitHub (Dec 16, 2025):

It seems like default Annotation system lost its schema definition passing to studio in new version for some reason?

You need to switch to zod schema system but with extra step, I digged these info from other issue and source code, doesnt know why thsese not mentioned in official docs. So it kind confusing in new version.

import { StateGraph, MessagesZodState } from "@langchain/langgraph";
import z from "zod/v3";
const workflow = new StateGraph(MessagesZodState)

And the way to defined you own state, need to go with withLangGraph method and the meta info.
Also you need to stick with zod/v3. Using v4 will causing longer loading time, and studio failed to recognized the messages key again. :/

import { withLangGraph } from "@langchain/langgraph/zod";
import { MessagesZodMeta} from "@langchain/langgraph";
import z from "zod/v3";

export const AgentState = z.object({
    messages: withLangGraph(
        z.custom<BaseMessage[]>(),
        MessagesZodMeta),
});

The MessagesZodMeta is the key point here, it come with an special mark. So if you consctruct your own meta you need add the langgraph_type like what source code did.
https://github.com/langchain-ai/langgraphjs/blob/99a989166f9d9cfea693bb49ae507191743ec600/libs/langgraph-core/src/graph/messages_annotation.ts#L64-L68

@LaysDragon commented on GitHub (Dec 16, 2025): It seems like default Annotation system lost its schema definition passing to studio in new version for some reason? You need to switch to [zod schema system](https://docs.langchain.com/oss/javascript/langgraph/graph-api#schema) but with extra step, I digged these info from other issue and source code, doesnt know why thsese not mentioned in official docs. So it kind confusing in new version. ```ts import { StateGraph, MessagesZodState } from "@langchain/langgraph"; import z from "zod/v3"; const workflow = new StateGraph(MessagesZodState) ``` And the way to defined you own state, need to go with `withLangGraph` method and the meta info. Also you need to stick with zod/v3. Using v4 will causing longer loading time, and studio failed to recognized the messages key again. :/ ```ts import { withLangGraph } from "@langchain/langgraph/zod"; import { MessagesZodMeta} from "@langchain/langgraph"; import z from "zod/v3"; export const AgentState = z.object({ messages: withLangGraph( z.custom<BaseMessage[]>(), MessagesZodMeta), }); ``` The MessagesZodMeta is the key point here, it come with an special mark. So if you consctruct your own meta you need add the langgraph_type like what source code did. https://github.com/langchain-ai/langgraphjs/blob/99a989166f9d9cfea693bb49ae507191743ec600/libs/langgraph-core/src/graph/messages_annotation.ts#L64-L68
Author
Owner

@ErickWendel commented on GitHub (Feb 5, 2026):

Same problem here, chat only appears with these versions:

  "@langchain/core": "^0.3.42",
    "@langchain/langgraph": "^0.2.55"
@ErickWendel commented on GitHub (Feb 5, 2026): Same problem here, chat only appears with these versions: ``` "@langchain/core": "^0.3.42", "@langchain/langgraph": "^0.2.55" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#339