How to pass a "runtime args" to a graph node?

Hello. I have a planner node, and I want it accept some runtime args, for example:

def planner_node(state:MainState, args:dict):
    pass 

This node may make
(1) A fresh plan, without any dependence of previous steps.
(2) A replan, previous steps are done, I want to pass the “uuid” of the replanning step, so that I can find all the informations of previous step.
(3) A plan correction. Some steps fail, I need to replan the single step or cancel the subsequent steps. In this case, I also need args to pass a “UUID”.
I cannot use a tool to do this, because it’s not reliable to pass “uuid” through tool args.
Anyone has some idea? Thanks.

I find that I can use another state in a graph node, may be that’s the solution.

def planner_node(state:PlannerState):
    pass

Yes, you can just use the state, you don’t need to a dedicated arg for this:
State = what changes as the graph moves; put planner_request: { mode, step_id } there and set it when routing (Command(goto="planner", update={...}) or conditional edges). Clear it after the planner runs.