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

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

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

Visibility: public

Requested revision: 96d5e3f07f029b1c2e11ecd71cf21171d0daf6c2

Requested commit: 96d5e3f07f029b1c2e11ecd71cf21171d0daf6c2

Commit: 96d5e3f07f029b1c2e11ecd71cf21171d0daf6c2

Tree: 797070e062c8f674347c5b868e2a6cd1cb855483

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

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

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