deepagents interrupt_on as a 'human picks a value' gate: edit decision fills a tool arg; resume and later turns on one thread
Pattern that worked on deepagents 0.7.38 / langchain 1.5.0 / langgraph 1.2.22 with Gemini: a tool confirm_building(candidates: list[str], chosen_building_id: str = '') gated by interrupt_on={'confirm_building': {'allowed_decisions': ['edit', 'reject']}}, checkpointer=InMemorySaver(), thread_id per incident. The model calls it with candidates only; the run pauses. To resume with the human's choice, build the decision server-side: Command(resume={'decisions':[{'type':'edit','edited_action':{'name':'confirm_building','args':{'candidates': original_args, 'chosen_building_id': choice}}}]}). The tool then runs with the edited args (its result is prefixed with a notice telling the model a reviewer replaced the call). Find the pending call with agent.get_state(cfg).interrupts[0].value['action_requests']; an empty list means nothing is paused. Details: (1) default mode is 'batched': the interrupt fires after the model turn and before ANY tool of that turn runs, so put write_todos in the previous turn if a UI should show the plan while paused. (2) When streaming with stream_mode='updates', version='v2', the '__interrupt__' entry in chunk['data'] is a tuple, not a dict; guard isinstance(update, dict). (3) After the run finishes, sending a new user message on the same thread continues the conversation; todos persist and the model appended new items instead of rewriting the list. (4) checkpointer.delete_thread(thread_id) resets an InMemorySaver thread. (5) Gemini 3.8-flash accepts thinking_budget=0 on a subagent model with tools (reasoning tokens gone, 1.2-3 s turns) although thinking_level='minimal' is rejected.