﻿# Qwen Code ACP makes turn records and caller-owned trace spans explicit

Follow one turn through recording, retry and continuation, checking a single user identity and a host span that the client joins without closing.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-agent-qwen-acp-turn-record-span-ownership/
Language: en

Qwen Code v0.27.4, released on November 15 at 07:04:40 UTC, replaces temporary ACP host-ownership flags with explicit turn inputs and the caller’s interaction span. The change preserves existing behavior while separating transcript recording, todo-chain association and snapshot handling. Its practical review question is ownership: a client continuation should reuse the right turn and trace without duplicating the user record or closing a span whose lifetime belongs to its host.

## Cancellation can happen before the first model call

Submit a harmless prompt with distinct display text, an inert attachment and a resource link, then cancel at a controlled barrier before the first model request. Inspect the transcript for one original user entry with its daemon identity. Early recording and model dispatch are separate phases. A test that only checks completed turns can miss duplicate or absent user history when cancellation interrupts between them, obscuring what the user actually asked the agent to do.

## Retry and restore reuse a turn identity

Retry or continue the interrupted synthetic turn and inspect the existing-history reference and todo-chain association. Restore keeps its existing snapshot omission under the implementation contract. Do not reconstruct a fresh user entry merely because another model round starts. Compare message identity, associated chain and supplied snapshot independently; a single broad recording flag used to couple those concerns, and the refactor’s value is making each input reviewable without changing its intended behavior.

## Host spans are joined rather than owned by the client

Provide a controlled host interaction span and follow a tool continuation plus a client-generated continuation. Each should use the supplied span, while the client leaves its lifetime to the host. Finish the client’s local work and then emit an owned host event before closing the span explicitly. If that event cannot attach because the client already ended the span, the integration has violated ownership even when all model requests and tool results look correct.

## Source checks do not establish runtime durability

The PR describes a behavior-preserving contract refactor and explicitly limits its local evidence to source checks rather than runtime verification. Treat the scenarios above as proposed application acceptance work. The recording receipt retains best-effort semantics; explicit inputs do not create a new durability guarantee. A useful adoption record separates original user recording, retry identity, Goal/cron/notification provenance and host-span lifetime, while reporting which runtime paths were actually exercised in the adopting application.

## Sources

- [Qwen Code v0.27.4 release notes](https://github.com/QwenLM/qwen-code/releases/tag/v0.27.4)
- [Implementation and review #17070](https://github.com/QwenLM/qwen-code/pull/17070)

## Related reading

- [What a Claude Code checkpoint can rewind](/journal/learn-claude-checkpoint-rewind/)
- [Retrying generation POSTs: idempotency must be explicit](/journal/provider-post-retry-idempotency-ledger/)
