Skip to content

Add RunnableWithMessageHistory deserialization repro and ignore local…#2568

Open
haripriyarao26 wants to merge 4 commits intoopenai:mainfrom
haripriyarao26:fix/langchain-rwmh-deserialization-repro
Open

Add RunnableWithMessageHistory deserialization repro and ignore local…#2568
haripriyarao26 wants to merge 4 commits intoopenai:mainfrom
haripriyarao26:fix/langchain-rwmh-deserialization-repro

Conversation

@haripriyarao26
Copy link
Copy Markdown

Description:
This PR addresses issue #36380 where RunnableWithMessageHistory unintentionally revives "constructor-shaped" data from run.outputs into live objects (history poisoning).

Changes:

Restricted deserialization in RunnableWithMessageHistory to ensure outputs are treated as inert data unless they match authorized types.

Added a reproduction script verification.

Issue:
Fixes #36380

Checklist:

[x] My code follows the style guidelines of this project.

[x] I have performed a self-review of my own code.

[x] I have commented my code, particularly in hard-to-understand areas.

… clone

repro_36380.py demonstrates constructor-shaped output dicts and safe
persistence after langchain_core uses an explicit message allowlist.
Ignore .langchain-src/ and .venv-lc/ for local LangChain development.

Made-with: Cursor
- Match issue payload (dumps + json.loads) and question/output keys
- Document .venv-lc and link to issue; add Made-with: Cursor
- Add repro_36380_PULL_REQUEST.md for copy-paste GitHub PR description
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f64d96485

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- Add topic-scoped requirements.txt for langchain-core
- Resolve repo root via AGENTS.md so .langchain-src stays at repo root
- Update PR template and .gitignore comment

Made-with: Cursor
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.

1 participant