turn-admission · git:20261004.1dfa507 · 2026-10-04 · sha256 e0864cdd0931866d

turn-admission git:20261004.1dfa507A

Immutable. This exact content never changes and is served at /api/v1/blob/e0864cdd0931866d.

---
description: Immediate turn admission and autonomous retry semantics
globs:
  - "internal/session/manager_turn_lock*.go"
  - "internal/session/turn_busy.go"
  - "internal/agent/background_notify*.go"
  - "internal/serve/wake.go"
  - "cmd/coddy/acp_wake*.go"
  - "external/cli/background.go"
  - "external/httpserver/composer_stream_relay.go"
  - "external/httpserver/turn_mirror.go"
  - "external/httpserver/*wake*.go"
  - "external/gateway/*/wake.go"
alwaysApply: false
---
# Turn admission

- The turn lock refuses immediately and never queues.
- An autonomous caller preserves and propagates `ErrSessionTurnBusy` for retry; it is not success, permanent failure, or a consumed notification.
- Retry absorbs tasks completed while waiting and avoids starting a second turn.
- Acquire the turn before replacing live relay ownership.
- Every new autonomous path gets an end-to-end test with the real manager lock.