# fix\(acp\): Preserve wake evidence across an app-owned wake · pingdotgg/t3code

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

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

Visibility: public

Requested revision: 18352f385ca75258d20a13510ff786469756141d

Requested commit: 18352f385ca75258d20a13510ff786469756141d

Commit: 18352f385ca75258d20a13510ff786469756141d

Tree: 7d815040fdde05c76a436fc06949584905542da0

Author: Mike Olson

Committer: Julius Marminge

## Message

```
fix(acp): Preserve wake evidence across an app-owned wake

This PR introduces the only wakeBuffer clear at the ACP startTurn site, and it
also clears midTurnUnreportedCompletedTaskIds there, both on the reasoning that
a user turn owns the conversation.

An orchestrator-injected wake is not a user turn. #4499
fix/delegated-task-parent-wake dispatches app-owned delegated-child wakes as
creationSource "server", which is non-continuation, so once both land such a
wake would discard this session's pending native wake frames and its kept
mid-turn completion marks, losing agent output and a continuation offer that
nothing else can recover.

acpIsAppOwnedWakeTurn exempts orchestrator-injected wakes from both clears,
matching what ClaudeAdapterV2 already does with its own buffer. Inert without
#4499, since nothing else dispatches creationSource "server". Kept as its own
commit because the concern originates in a different PR.

```

## Parents

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

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