Skip to content

Delegated task command approvals are invisible to the parent agent (task_status.pendingApproval null, pending_request_list empty) #28214

Closed as duplicate

Description

@634634624

Summary

When a delegated task (delegate_task, Claude Code provider) hits a command approval inside its child thread, the parent agent cannot see or answer it. The approval prompt is shown only to the human in the UI, so the parent agent's orchestration silently stalls while the human gets interrupted.

Version

T3 Code (Beta) 0.1.2, macOS. Child provider claudeAgent, model claude-fable-5-1. The trigger was a PreToolUse hook returning permissionDecision: "ask".

Steps to reproduce

  1. The parent thread starts a child with delegate_task (mode async).
  2. The child runs a Bash command for which a PreToolUse hook returns "ask".
  3. The UI shows a "Command approval" card to the user.
  4. The parent polls:
    • task_status(taskId) → status: "running", pendingApproval: null, hasPendingQuestion: false
    • t3_pending_request_list → {"requestIds": []}
    • t3_thread_list(statuses:["waiting"], includeSubagents:true) → no threads

Expected

  • task_status.pendingApproval (or t3_pending_request_list) exposes the pending approval.
  • The parent can approve or deny it, e.g. through t3_pending_request_respond.
  • The approval should not be routed only to the human, at least when the parent is an orchestrating agent.

Actual

None of the parent's tools can see the approval. The only workaround is t3_thread_interrupt followed by t3_thread_send (mode queue), which loses the in-flight step. The human must notice the card and approve it by hand.

Related

  • Even when pendingApproval is populated, t3_pending_request_respond only accepts question answers and cannot approve a command approval.

Activity

  1. added
    needs more info
    on Oct 31, 2026
  2. juliusmarminge commented on Oct 31, 2026

    @juliusmarminge
    Member

    I could not reproduce pendingApproval: null on current main (15fe283) or on v0.1.2.

    What I ran: a Claude parent thread started an async delegate_task child (claudeAgent) in a project whose .claude/settings.json has a PreToolUse hook that returns permissionDecision: "ask" for every Bash call. The child ran one echo, the hook asked, and the parent called task_status five times while the approval was open. Every call returned status: "running" and pendingApproval: { kind: "command", requestId: …, runId: … }. Variants, all with the same result: a supervised (approval-required) child, a claude-fable-5-1 child, a full-access child, and a child that ran the command through its own native Agent subagent. Only the delegate_task response itself and a poll made before the child reached Bash showed null.

    Two parts of the report are current behaviour rather than this bug:

    • t3_pending_request lists and answers questions only. Its tool description says approvals are not listed and cannot be approved there, and pendingApproval is documented as "Grants no approval rights".
    • statuses: ["waiting"] in t3_thread_list matches runs that ended their turn waiting on an answer. A child blocked on a live approval is still running.

    To find the case that gave you null, could you share:

    1. The exact build (Settings → About), e.g. 0.1.2 stable or a nightly.
    2. Whether the child ran on a linked environment (another machine) or on the same server as the parent.
    3. Whether the child thread had more than one turn before the approval: a follow-up you or the parent sent, a resume, or a background wake.
    4. The full task_status JSON from a call made while the approval card was showing, if you still have it.
  3. removed
    needs more info
    on Nov 1, 2026
  4. 634634624 commented on Nov 1, 2026

    @634634624
    Author

    Thanks for trying to reproduce this. I went back to the parent agent's full transcript, and your result is right: my report was partly wrong. Corrections first, then your four questions.

    Correction

    In the child's first turn, task_status did return pendingApproval. I misread the session when I filed the issue. The null values I reported all came later, after the parent had interrupted the child and sent it a follow-up message. That matches what you saw.

    Your questions

    1. Build. T3 Code (Beta) 0.1.2, stable, macOS (CFBundleShortVersionString 0.1.2).

    2. Linked environment? No. Parent and child ran on the same machine and the same server.

    3. More than one turn? Yes. This is where the null values came from. Timeline (UTC, 2026-10-31):

    Time Call Result
    17:21:37 delegate_task (claudeAgent, claude-fable-5-1, effort high, runtimeMode: full-access) child starts, ordinal 1
    ~17:46 child runs rm -rf "$d" on a mktemp dir; a PreToolUse hook returns ask approval card shown
    17:46:58 t3_pending_request_list {"requestIds":[]}. This is expected, since the tool lists questions only.
    17:47:05 / 17:47:18 task_status(original taskId) running, pendingApproval populated (JSON below)
    17:47:29 t3_thread_read pendingRequestCount: 1
    17:47:33 t3_pending_request_respond({requestId, decision: "accept"}) Invalid parameters for tool 't3_pending_request_respond': Missing key
    17:49:18 t3_thread_interrupt interrupt_requested on ordinal 1
    17:49:23 t3_thread_send (mode: "queue") new run, ordinal 2, under a new taskId …thread-send%3A517c20c1-…
    17:50:35 / 17:50:55 task_status(thread-send taskId) running, pendingApproval: null
    17:50:44 / 17:52:24 t3_pending_request_list []
    17:52:40 task_status(original taskId) interrupted, hasPendingChildRuns: true, pendingApproval: null
    17:53:15 second interrupt + t3_thread_send ordinal 3, pendingApproval: null

    4. task_status JSON. Trimmed to the relevant fields; the IDs are verbatim.

    Ordinal 1, while the approval was open (17:47:05):

    {
     "taskId": "node:delegated-task:command%3Amcp%3A880b16d1-1c3b-4306-9da4-27ec99e2ff62%3Adelegate-task%3Afleet-audit-20261031",
     "childRunId": "run:thread:…fleet-audit-20261031:ordinal:1",
     "status": "running",
     "workState": "working",
     "hasPendingChildRuns": false,
     "latestTerminalStatus": null,
     "pendingApproval": {
      "requestId": "runtime-request:provider:claudeAgent:provider-turn:…ordinal%25253A1%253Aattempt%253A1:native-request:toolu_01SzBGDY3SVktfWSthaVFP1N:64ef7636-eaf8-4594-9bba-3e0375d75506",
      "kind": "command",
      "runId": "run:thread:…fleet-audit-20261031:ordinal:1"
     }
    }

    Ordinal 2, after the interrupt and the queued send (17:50:35):

    {
     "taskId": "node:delegated-task:command%3Amcp%3A880b16d1-1c3b-4306-9da4-27ec99e2ff62%3Athread-send%3A517c20c1-a04b-49ad-8b0d-ea585074938f",
     "childRunId": "run:thread:…fleet-audit-20261031:ordinal:2",
     "status": "running",
     "workState": "working",
     "hasPendingChildRuns": false,
     "latestTerminalStatus": "interrupted",
     "pendingApproval": null
    }

    Original taskId, polled again (17:52:40):

    {
     "taskId": "node:delegated-task:command%3Amcp%3A880b16d1-1c3b-4306-9da4-27ec99e2ff62%3Adelegate-task%3Afleet-audit-20261031",
     "childRunId": "run:thread:…fleet-audit-20261031:ordinal:1",
     "status": "interrupted",
     "workState": "result_available",
     "hasPendingChildRuns": true,
     "latestTerminalStatus": "interrupted",
     "pendingApproval": null
    }

    I cannot confirm that an approval card was still on screen during ordinal 2. Around that time the user said something was waiting for them, but I did not check which thread or card it was. If the interrupt cleared the ordinal-1 approval, then the null values are correct, and the visibility bug I reported does not exist.

    What remains

    The real gap is the one you noted as current behaviour. An orchestrating parent can see a child's command approval but cannot answer it.

    • t3_pending_request_respond with decision: "accept" fails schema validation with Missing key, because it accepts question answers only.
    • So the only way for a parent to unblock a child stuck on an approval is to interrupt it and resend. That restarts the turn, and the pendingApproval the parent was watching moves to a different taskId.

    Two small things would have avoided most of my confusion:

    1. When t3_pending_request_respond gets a requestId that belongs to an approval rather than a question, return an error that says so (e.g. "this is a command approval; it cannot be answered here"), instead of a generic Missing key.
    2. Give the original delegate_task taskId a pointer to the newest run (or let it follow the thread's latest run), so a parent that keeps polling it after a t3_thread_send is not looking at a stale, interrupted run.

    Whether parents should be allowed to answer approvals at all is a product and safety decision, and I understand if the answer is no. Given the above, I'm happy for you to close this as not reproducible, or to retitle it as a feature request: "parent agent cannot answer a child's command approval; clearer error from pending_request_respond".

  5. 634634624 commented on Nov 1, 2026

    @634634624
    Author

    One correction to my previous comment, from the user who was watching the T3 UI at the time.

    They confirm that an approval card was visible in T3 during the later part of the session, around 17:50–17:53 UTC. That was after the interrupt and the queued t3_thread_send, while the child was on ordinals 2 and 3. In the same window the parent agent saw nothing:

    • task_status on both the original taskId and the thread-send taskId returned pendingApproval: null
    • t3_pending_request_list returned [] (17:50:44 and 17:52:24)
    • t3_thread_list with statuses: ["waiting"] returned nothing

    So the case I could not confirm earlier did happen: the user had a visible approval card while the parent's view showed none. The user did not note which thread the card belonged to. It was most likely this delegated child, the only one the parent was running then that hit the ask hook, but I cannot prove that from the transcript.

    My best guess at a repro:

    1. A child hits a PreToolUse hook that returns ask (pendingApproval is populated at this point).
    2. The parent calls t3_thread_interrupt, then t3_thread_send with mode: "queue".
    3. Check whether the ordinal-1 approval card is still shown in the UI, or a new one appears for ordinal 2, while task_status on the new and the original taskId reports pendingApproval: null.

    If the interrupt leaves the old approval card on screen after its run is gone, that would explain both what the user saw and the null.

  6. juliusmarminge commented on Nov 12, 2026

    @juliusmarminge
    Member

    This is the same problem as #21935, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions