# Deep Agents subagent approval: multiple pending interrupts, and the wrong call gets approved

By Agent Signal · Published 2026-11-28 · Updated 2026-11-28

> **Short answer:** When the parent agent calls task for two subagents in one turn and both hit interrupt_on, deepagents 0.7.42 leaves two pending interrupts, and neither one names its subagent or the parent task call. Resuming with one flat {"decisions": [...]}, as in the docs example, raises RuntimeError: you must specify the interrupt id. Pairing your decisions with the interrupt list by position looks like the fix, but the order changes between processes: in two separate 30-run passes it refunded the subagent the reviewer rejected in 11 to 15 runs. Map each interrupt to its parent task call through the pending Send for that task, then resume with a dict keyed by interrupt id. The ACP server (#7021) still fails the same way, and async subagents (#7702) can drop a second question.


Your deep agent hands two jobs to two subagents in the same turn. Each subagent has a tool behind `interrupt_on`, so both stop and wait for a person. Now there are two pending approvals. Resume the way the docs show and you get `RuntimeError: When there are multiple pending interrupts, you must specify the interrupt id when resuming`. Fix that the obvious way, by pairing your decisions with the interrupt list, and some runs approve the call the reviewer rejected. This guide shows why, reproduces both failures, and gives a tested fix. Everything below ran on **deepagents 0.7.42, deepagents-acp 0.1.0, langgraph 1.2.24, langchain 1.5.2, langchain-core 1.8.5, langgraph-checkpoint 4.3.2, Python 3.13.5, Nov 28, 2026**.

## Who this hits

You are affected if all of these are true:

1. You build the agent with `create_deep_agent` and give one or more subagents an `interrupt_on` setting, so a tool call inside the subagent needs approval.
2. The parent model can call `task` more than once in one turn, so two subagents run in parallel and both reach an approval.
3. You resume from your own UI or API, or through the deepagents ACP server.

If you use async subagents, a related bug can hide a second question from the parent. It has its own section below.

## Why it happens

Each parallel `task` call runs as its own task, and each subagent that hits `interrupt_on` raises its own interrupt. So one turn with two `task` calls leaves two pending interrupts. Each one carries the subagent's `action_requests` (the tool name and arguments), but no field names the subagent or the parent `task` call that started it. If both subagents ask to refund the same order with a tool of the same name, the two payloads look the same.

The order of `__interrupt__` is not fixed either. In our tests, it stayed the same within one process and changed between processes. Sometimes subagent A's interrupt came first, sometimes B's.

The deepagents docs don't cover this case. They say "When a subagent triggers an interrupt, the handling is the same" and tell you to check for `__interrupt__` and resume with `Command`. Their "Match decision order to actions" example takes `result["__interrupt__"][0]` and resumes with one flat `{"decisions": [...]}` ([Deep Agents human-in-the-loop](https://docs.langchain.com/oss/python/deepagents/human-in-the-loop)). That works for one pending interrupt. With two, LangGraph needs a map from interrupt id to answer ([LangGraph: handling multiple interrupts](https://docs.langchain.com/oss/python/langgraph/interrupts#handling-multiple-interrupts)).

## Reproduce it

No LLM and no API key. The test builds a real `create_deep_agent` graph with `InMemorySaver` and scripted fake models. The parent calls `task` for subagents A and B in one turn (call ids `t-A`, `t-B`). Each subagent has its own `refund` tool behind `interrupt_on` and writes every refund that actually runs to a ledger. Trimmed from `common.py`:

```python
subagents = [
    {
        "name": name,
        "description": f"subagent {name}",
        "system_prompt": "Refund the order.",
        "tools": [make_refund(name, ledger)],
        "interrupt_on": {"refund": True},
        "model": model(name, [
            AIMessage("", tool_calls=[tool_call("refund", {"order": order}, f"r-{name}")]),
            AIMessage(f"{name} done"),
        ]),
    }
    for name, order in ORDERS[args_mode].items()
]
task_calls = [tool_call("task", {"description": f"do {n}", "subagent_type": n}, f"t-{n}") for n in ("A", "B")]
parent = model("parent", [AIMessage("", tool_calls=task_calls), AIMessage("all done")])
agent = create_deep_agent(model=parent, subagents=subagents, checkpointer=InMemorySaver())
```

`ORDERS` has two modes: `distinct` (A refunds `A-1001`, B refunds `B-2002`) and `same` (both refund `1001`).

**Failure 1: the docs-style resume.** One flat decision list, as in the docs example (`repro_scalar.py`):

```python
agent.invoke(Command(resume={"decisions": [{"type": "approve"}]}), config)
```

**Failure 2: pairing decisions by position.** The reviewer wants to approve A and reject B. The client assumes `__interrupt__` follows the parent's task-call order and sends decision `i` to interrupt `i` (`repro_position.py`). Each trial runs in a fresh process, because the order only changes between processes:

```python
interrupts = start(agent, config)["__interrupt__"]
buggy = {intr.id: {"decisions": [d]} for intr, d in zip(interrupts, [APPROVE, REJECT])}
agent.invoke(Command(resume=buggy), config)
```

We ran everything twice, as two separate 30-run passes: pass 1, and pass 2, an independent re-run of the same scripts. The lines below are copied from the two result files:

```text
pass 1
1 scalar resume, 2 parallel subagent interrupts: {"runs": 30, "two_interrupts": 30, "errors": {"RuntimeError: When there are multiple pending interrupts, you must specify the interrupt id when resuming. Docs: https://docs.langchain.com/oss/python/langgraph/interrupts#handling-multiple-interrupts.": 30}, "refunds_executed_total": 0}
2 positional decisions, args=distinct (intent: approve A, reject B): {"trials": 30, "errors": 0, "A_first": 19, "B_first": 11, "B_refund_ran_wrongly": 11, "A_wrongly_rejected": 11, "correct": 19}
2 positional decisions, args=same (intent: approve A, reject B): {"trials": 30, "errors": 0, "A_first": 15, "B_first": 15, "B_refund_ran_wrongly": 15, "A_wrongly_rejected": 15, "correct": 15}

pass 2
1 scalar resume, 2 parallel subagent interrupts: {"runs": 30, "two_interrupts": 30, "errors": {"RuntimeError: When there are multiple pending interrupts, you must specify the interrupt id when resuming. Docs: https://docs.langchain.com/oss/python/langgraph/interrupts#handling-multiple-interrupts.": 30}, "refunds_executed_total": 0}
2 positional decisions, args=distinct (intent: approve A, reject B): {"trials": 30, "errors": 0, "A_first": 15, "B_first": 15, "B_refund_ran_wrongly": 15, "A_wrongly_rejected": 15, "correct": 15}
2 positional decisions, args=same (intent: approve A, reject B): {"trials": 30, "errors": 0, "A_first": 18, "B_first": 12, "B_refund_ran_wrongly": 12, "A_wrongly_rejected": 12, "correct": 18}
```

Failure 1 is loud and safe: 30 of 30 runs raised `RuntimeError`, and no refund ran. Failure 2 is quiet. In every run where B's interrupt came first, B's refund ran and A's was rejected, the opposite of what the reviewer chose. The wrong count equals the number of B-first runs every time: 11 and 15 of 30 with distinct arguments, 15 and 12 of 30 with the same arguments. No error, and the run finishes normally.

## The fix

Map each pending interrupt to the parent `task` call that raised it, then resume by interrupt id. In LangGraph, each parallel `task` call is a pending Send task with the path `("__pregel_push", idx)`. `idx` points into the checkpoint's list of pending Sends (the `__pregel_tasks` channel), and each Send carries the exact tool call, id and `subagent_type` included. `fix.py`:

```python
"""Map each pending interrupt to the parent `task` call that raised it, then resume by interrupt id."""
from langchain_core.messages import AIMessage
from langgraph.types import Command


def _sent_tool_call(packet):
    arg = packet.arg  # langchain 1.5: [tool_call]; older versions: {"tool_call": ...}
    return arg[0] if isinstance(arg, list) else arg["tool_call"]


def pending_subagent_approvals(agent, config):
    state = agent.get_state(config)
    checkpoint = agent.checkpointer.get_tuple(state.config).checkpoint
    sends = checkpoint["channel_values"].get("__pregel_tasks", [])
    last_ai = next(m for m in reversed(state.values["messages"]) if isinstance(m, AIMessage) and m.tool_calls)
    pending = []
    for task in state.tasks:
        if not task.interrupts or task.path[0] != "__pregel_push":
            continue
        idx = task.path[1]
        call = _sent_tool_call(sends[idx])
        for intr in task.interrupts:
            pending.append({
                "task_call_id": call["id"],
                "subagent_type": call["args"].get("subagent_type"),
                "interrupt_id": intr.id,
                "action_requests": intr.value["action_requests"],
                # For comparison only: what the tempting tool_calls[path[1]] lookup would pick.
                "naive_task_call_id": last_ai.tool_calls[idx]["id"] if idx < len(last_ai.tool_calls) else None,
            })
    return pending


def resume_for(pending, decisions_by_subagent):
    """Command resuming only the listed interrupts. Keys: subagent_type or task_call_id."""
    resume = {}
    for p in pending:
        key = p["task_call_id"] if p["task_call_id"] in decisions_by_subagent else p["subagent_type"]
        if key not in decisions_by_subagent:
            continue  # leave this one pending
        if sum(q["subagent_type"] == key for q in pending) > 1:
            raise ValueError(f"{key!r} has several pending calls; key by task_call_id instead")
        decision = decisions_by_subagent[key]
        resume[p["interrupt_id"]] = {"decisions": decision if isinstance(decision, list) else [decision]}
    return Command(resume=resume)
```

Show the reviewer `subagent_type`, `task_call_id` and `action_requests` from each entry, then resume with the answers keyed by subagent (or by task call id, if the same subagent type runs twice):

```python
pending = pending_subagent_approvals(agent, config)
agent.invoke(resume_for(pending, {"A": APPROVE, "B": REJECT}), config)
```

Interrupts you leave out stay pending, so you can also answer one at a time. `fix_test.py` checks three variants, each trial in a fresh process:

- **One resume:** approve A, reject B.
- **Two resumes:** approve A, then approve B. After the first resume only B may be pending, and the second resume must not run A's subagent again.
- **Index shift:** the parent first makes a guarded `write_todos` call (id `t-todo`) that the reviewer rejects, then the two `task` calls.

Each trial checks that the right refunds ran, that each model (parent, A, B) was called exactly twice, that no interrupt is left and that the final message is `all done`. Condensed from both result files:

```text
                          pass 1             pass 2
one resume, distinct      30/30 correct      30/30 correct
one resume, same          30/30 correct      30/30 correct
two resumes, distinct     30/30 correct      30/30 correct
two resumes, same         30/30 correct      30/30 correct
index shift, distinct     30/30 correct      30/30 correct   naive tool_calls[path[1]] right 0/30
index shift, same         30/30 correct      30/30 correct   naive tool_calls[path[1]] right 0/30
```

In the two-resume variant, A's subagent model was not called again on the second resume, and A's refund ran once. The index-shift variant is why you shouldn't look up `last_ai.tool_calls[path[1]]`. LangChain's agent router builds the Send list only from tool calls that don't have a result yet. The rejected `write_todos` call already has one, so it is skipped: the two `task` calls sit at `tool_calls[1]` and `tool_calls[2]`, while their Sends sit at index 0 and 1. The naive lookup mapped A to `t-todo` and B to `t-A`, wrong in 30 of 30 runs in both passes. Reading the Send packet got all 30 right.

**What this relies on.** `__pregel_tasks` is an internal LangGraph checkpoint channel, not a public API. The shape of the Send argument already differs between langchain versions (the helper handles both). Pin deepagents, langgraph and langchain, and keep a test like `fix_test.py` in CI, so an upgrade that changes the channel fails a test instead of approving the wrong refund. We tested with `InMemorySaver`, fake models and one process per trial, not with a LangGraph server deployment or Postgres.

Stuck on a subagent approval flow? [Send a minimal repro](/fix/?k=seo-deepagents-subagent-approval-multiple-interrupts); you pay $79 only when our patch passes it.

## ACP: the same failure in deepagents-acp

The deepagents ACP server hits failure 1 on its own. [Issue #7021](https://github.com/langchain-ai/deepagents/issues/7021), opened Oct 17, 2026, shows two subagents with approvals running through `AgentServerACP`. The client approves every request, and the prompt still fails with the multiple-pending-interrupts `RuntimeError`. The issue says the client can also receive only one of the two approval requests. It traces this to the ACP prompt loop resuming with `Command(resume={"decisions": user_decisions})`.

It was closed as not planned the same day. The maintainer pointed to the contributing guide: "Please avoid submitting issues discovered by (AI) code-scanning without first personally validating them and grounding them in real usage of LangChain's public APIs." The comment asks people who hit this while building with deepagents to open a new issue that links it ([maintainer comment](https://github.com/langchain-ai/deepagents/issues/7021#issuecomment-6240481788)). The fix PR, [#7019](https://github.com/langchain-ai/deepagents/pull/7019), was closed without being merged.

We ran the issue's script as is on deepagents-acp 0.1.0: `RuntimeError` in 30 of 30 runs, in both passes. When we checked the ACP server on main on Nov 28, 2026, it still resumed with a flat `{"decisions": ...}`. If you need parallel subagent approvals over ACP today, the server won't route them for you.

## Async subagents: the second question never reaches the parent

[Issue #7702](https://github.com/langchain-ai/deepagents/issues/7702), opened Nov 13, 2026 and still open, is about async subagents. The parent sees a child waiting for the user on run "first". The user answers, a new run starts and pauses with a new question. On the parent's next poll, the parent keeps the old run id and sends no notification to its model, so nobody sees the second question.

We ran the issue's scenario, which stubs the Agent Protocol client, on deepagents 0.7.42: 0 notifications in 30 of 30 runs, in both passes. The issue's own script exits with `Notifications: 0` and an `AssertionError`. We also tried two workarounds that don't patch deepagents:

- **Call `check_async_task` yourself.** It does return the new question ("Use deepagents?"), but the saved task record keeps the stale run id "first" and status "waiting".
- **Mark waiting tasks as running before the poll.** The poll then sends one notification with the question, but the run id still stays "first". The next plain poll sends nothing, and if you apply the reset again, it sends the same question again.

Neither is clean. A proper fix needs a change in deepagents. The reporter has a [candidate patch and regression tests](https://github.com/Htd7860/deepagents/commit/d048d055504eef9e896ee044a5ae61102897e6a6) in their fork. It is not merged.

We later tested this against a real local Agent Server and found an app-side workaround that passed 30 of 30 runs on deepagents 0.7.42 and 0.7.37: [Deep Agents async subagent: the second question never reaches the parent](/guides/deepagents-async-subagent-second-question-missing/).

## JavaScript

Two langgraphjs issues touch subagent interrupts on the frontend. [#3020](https://github.com/langchain-ai/langgraphjs/issues/3020), opened Oct 14, 2026, reports that a subagent paused on `interrupt()` shows `status: "error"`, and that after a page reload its interrupt loses its namespace, so it can't be linked back to the subagent. It was closed as not planned the same day; the maintainer said the namespace loss is tracked internally. [#3010](https://github.com/langchain-ai/langgraphjs/issues/3010), opened Oct 12, 2026 and still open, reports that a subagent's `useMessages`, `useToolCalls` and `useValues` stop updating after an interrupt inside that subagent is resumed. We did not test the JavaScript side.

## Does resume re-run the subagent?

For sync subagents, in our runs, no. Every trial in `fix_test.py` checked that the parent, A and B models were each called exactly twice: once to make the tool call, once after the result. That held in all 180 trials of each pass, including the two-resume variant, where A's model count didn't change on the second resume. Each approved refund ran once.

We did not measure code that runs before an interrupt in the same node. LangGraph restarts that node on resume by design, so a side effect there can run twice. See [LangGraph subgraph interrupt re-runs nodes on resume](/guides/langgraph-subgraph-interrupt-resume-reruns/).

## FAQ

### Why do I get "you must specify the interrupt id when resuming" with deepagents subagents?

Two subagents paused for approval in the same turn, so there are two pending interrupts, and a flat `{"decisions": [...]}` resume doesn't say which one it answers. In our runs on deepagents 0.7.42 it raised that `RuntimeError` in 30 of 30 runs, in both passes. Resume with a dict keyed by interrupt id instead.

### Can I pair my decisions with the interrupt list by position?

No. The order of `__interrupt__` changes between processes. In two separate 30-run passes, B's interrupt came first in 11 and 15 runs with distinct arguments, and 15 and 12 runs with the same arguments. Every one of those runs refunded B and rejected A, the opposite of the reviewer's choice.

### Can I tell the subagents apart from the interrupt payload?

Not reliably. The payload has the tool name and arguments, but no field naming the subagent or the parent task call. When both subagents asked to refund the same order, the payloads looked the same. Map each interrupt to its task call through the pending Send, as in `pending_subagent_approvals`.

### Is the fix safe to ship?

It passed 30 of 30 runs in every variant, in both passes. But it reads `__pregel_tasks`, an internal LangGraph checkpoint channel. Pin deepagents, langgraph and langchain, and keep a test like `fix_test.py` in CI, so an upgrade that changes it fails a test, not a refund.

### Does the deepagents ACP server handle parallel subagent approvals?

Not as of Nov 28, 2026. Issue #7021 was closed as not planned, and fix PR #7019 was closed without being merged. The issue's script still raised the multiple-interrupts `RuntimeError` in 30 of 30 runs on deepagents-acp 0.1.0.

### Does resuming re-run the subagent?

Not in our runs with sync subagents. Each model was called exactly twice in every trial, and on the second of two resumes, A's subagent and its refund did not run again. Code before an interrupt in the same node is a different case, because LangGraph restarts that node.

## Related

- [Deep Agents async subagent: the second question never reaches the parent](/guides/deepagents-async-subagent-second-question-missing/)
- [LangGraph multiple interrupts: how to resume each one](/guides/langgraph-multiple-interrupts-resume/)
- [LangGraph parallel tool approval asked again and runs twice](/guides/langgraph-parallel-tool-approval-runs-twice/)
- [LangGraph subgraph interrupt re-runs nodes on resume](/guides/langgraph-subgraph-interrupt-resume-reruns/)
- [How to test LangGraph resume for double charges after a restart](/guides/test-langgraph-resume-duplicate-side-effects/)
- Free template: [Multiple interrupts in one node](/templates/langgraph-multi-interrupt/?k=seo-deepagents-subagent-approval-multiple-interrupts), a tested LangGraph starter that resumes parallel interrupts by `Interrupt.id`.

Stuck on a subagent approval flow? [Send a minimal repro](/fix/?k=seo-deepagents-subagent-approval-multiple-interrupts); you pay $79 only when our patch passes it.
