Skip to content

Add override state value field to initialize_from #416

Closed

Description

@skrawcz

Is your feature request related to a problem? Please describe.
When forking from state, we might want to augment the state as part of debugging/forking.

Describe the solution you'd like
To be able to modify the starting state when using initialize_from to build the initial state.

Use cases:

  • fix state (e.g. I saw in the state it was bad, let me fix it)
  • turn on other logic via state
  • override values, e.g. change the email, etc.
values_i_want_to_override = {"key": "value"} 

app = (ApplicationBuilder().
    ...
  .initialize_from(
   ..., 
   override_state_values=values_i_want_to_override
  ).build()
)

For the UI:

  • we should call the override out. E.g. via some marker to indicate we forked, but modified state...

Describe alternatives you've considered
You can do this today, it just happens outside of the application builder:

  1. manually load state via the persister.
  2. adjust the state as needed
  3. create a graph from that state and that point in the graph

Additional context
This just reduces some boilerplate.

Activity

  1. Smitaambiger commented on Jan 11, 2026

    @Smitaambiger
    Contributor

    Hi @skrawcz ,

    I’m interested in working on this issue.
    I’ve gone through the description and the current initialize_from flow, including the persister-based workaround mentioned.

    My initial thought is to add an optional override_state_values parameter to initialize_from, apply overrides after loading the base state but before building the application, and keep behavior unchanged when the parameter is not provided.

    Happy to adjust the approach based on your feedback.
    Thanks!

  2. skrawcz commented on Jan 13, 2026

    @skrawcz
    ContributorAuthor

    @Smitaambiger sounds good. Want to give it a shot?

  3. Smitaambiger commented on Jan 13, 2026

    @Smitaambiger
    Contributor

    Hi @skrawcz , I’ve opened a PR implementing this feature here:
    #632

    Happy to make any changes based on feedback. Thanks!

  4. andreahlert commented on Mar 16, 2026

    @andreahlert
    Collaborator

    PR #632 added the override_state_values parameter to initialize_from. Merged Jan 2026.

  5. andreahlert commented on Mar 28, 2026

    @andreahlert
    Collaborator

    Labels migrated to new taxonomy (#692).

  6. andreahlert commented on Mar 30, 2026

    @andreahlert
    Collaborator

    Resolved by #632 (merged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions