Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] State is not saved when using Custom State (Code) in a sequential flow after updating to versions 2.2.3 or 2.2.4 #3921

Open
paulo-rossy opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@paulo-rossy
Copy link

Title: State is not saved when using Custom State (Code) in a sequential flow after updating to versions 2.2.3 or 2.2.4

Description:
After upgrading to versions 2.2.3 and 2.2.4, the logic for storing values in the state (using Custom State Code) broke in my flow. I’m trying to store a user-selected address in the state in the first LLM node.

  • Custom State (Table) still works correctly: the address is saved consistently.
  • Custom State (Code), however, fails to save any values.

I created two test flows:

  1. A flow using Custom State (Table) (works as expected).
  2. A flow using Custom State (Code) (values do not save).

I have attached both flows to this issue for reference and debugging.

Steps to Reproduce:

  1. Use the attached flow with Custom State (Code).
  2. Enter one of the two address values (1 moncayo 25 or 2 torres 104)
  3. In the first LLM node, attempt to extract the user’s address from their input and store it in the state.
  4. Check logs (e.g., in the Docker container) or any other debugger to see if the value is stored.
  5. Repeat the same scenario with Custom State (Table), which saves the data without issues.
    Expected Behavior:
    The address entered by the user should correctly save to the state when using Custom State (Code), just as it does with Custom State (Table).

Actual Behavior:
No value is saved to the state when using Custom State (Code), despite logs indicating that the write attempt is made.

Additional Information:

  • Affected Versions: 2.2.3 and 2.2.4
  • I added extra logging in the final node, which shows that the save attempt is triggered, but the state remains empty.
  • I’m attaching both flow configurations to help you reproduce the issue quickly.

Thank you in advance for your assistance in resolving this!

state with code [bug report] Agents.json
state with table [bug report] Agents.json

@HenryHengZJ HenryHengZJ added the bug Something isn't working label Jan 26, 2025
@HenryHengZJ
Copy link
Contributor

I tried the flow with code, and the address was succesfully saved to state (seems like):

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants