Skip to content

Thread briefly becomes inactive while a turn starts #4099

Description

@D3OXY

Problem

When a provider session starts a turn, the thread can briefly transition from Connecting to inactive before becoming Working. This makes status-grouped thread lists jump between sections during startup.

The lifecycle currently exposes provider readiness between session connection and turn start as an idle-ready state, even though a turn-start request is still pending.

Expected behavior

A pending turn should remain Connecting through provider readiness and transition directly to Working when the turn starts. A failed start should still settle to ready or error, and genuinely idle sessions should remain inactive.

Acceptance criteria

  • New and restarted sessions do not expose an inactive frame during turn startup.
  • Provider readiness preserves Connecting while a turn start is pending.
  • Turn start transitions directly from Connecting to Working.
  • Failed starts and genuinely idle sessions keep their existing terminal states.
  • Lifecycle coverage includes successful startup, failed startup, and idle readiness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.🚧 In Progress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions