# fix\(opencode\): route child-session approvals through the v2 adapter · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/f17ee3963bf477b0209fa8c2fd3345705e548201)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: f17ee3963bf477b0209fa8c2fd3345705e548201

Requested commit: f17ee3963bf477b0209fa8c2fd3345705e548201

Commit: f17ee3963bf477b0209fa8c2fd3345705e548201

Tree: 624955fa8f63b751b2975177c8f5fb0b9c621d5f

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(opencode): route child-session approvals through the v2 adapter

Ports the v2-applicable half of #8480 (the v1 adapter rewrite was not
carried; this branch's OpenCode path is OpenCodeAdapterV2). Permission
and question asks from child sessions — task subagents and their
descendants — were dropped because the adapter only looked up root
thread sessions. Related sessions now map back to the owning root
state (registered from task parts and session.created/updated parent
chains), and an ask that arrives before the relation is known resolves
it inline via session.get with a short forked backoff, then surfaces
the approval on the root turn. Replies already route by native request
id. Interrupts now tolerate the abort racing turn settlement instead
of failing the stop.

Covered by a new opencode_child_approval replay fixture where the
child asks for bash permission before the task part reveals the
relation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [12825b628744134d38e4c55f5f0ef07f55fcfce8](https://git.cafe/pingdotgg/t3code/commit/12825b628744134d38e4c55f5f0ef07f55fcfce8?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/f17ee3963bf477b0209fa8c2fd3345705e548201?format=markdown)
