Skip to content

[Bug]: QA native stop recovery can outwait fixed turn timeout #99655

Description

@RomneyDa

Bug type

Behavior bug (incorrect QA result without a runtime crash)

Beta release blocker

No

Summary

qa/scenarios/channels/native-command-session-target.yaml treats the native /stop acknowledgement as if the aborted turn has already released its session lane. Under QA Smoke CI contention, recovery can wait behind abort cleanup longer than the scenario's fixed 15000ms outbound timeout even though /stop targeted and aborted the correct conversation.

Steps to reproduce

  1. Run the isolated Crabline Telegram scenario with mock-openai/gpt-5.5 in the QA Smoke CI profile.
  2. Let the delayed turn become active and inject native /stop.
  3. Observe Agent was aborted, followed immediately by the recovery inbound turn.
  4. The recovery marker arrives only after the fixed 15000ms wait expires because the prior turn still owns the session lane while unwinding.

Exact evidence:

Expected behavior

The scenario should keep the native command and abort acknowledgement assertions, then allow the recovery message one full QA turn budget, including time queued behind abort cleanup.

Actual behavior

sessions.list.hasActiveRun can clear before the command lane is released, so it is not a valid idle signal. The QA flow has no gateway RPC exposing canonical session-lane idle state.

Fix and validation

Use the existing liveTurnTimeoutMs(env, 30000) full-turn timeout policy for the recovery outbound wait. Mock providers preserve the 30000ms fallback; live providers apply their model-specific floors. This adds no sleep and does not weaken the abort or recovery marker assertions.

Validation for the narrowed patch:

  • Scenario catalog: 32/32 tests passed.
  • Exact Crabline Telegram contention: four simultaneous workers passed 4/4; every recorder was parse-clean and contained both abort and recovery sends.
  • Fresh artifact-aware autoreview: clean, no accepted/actionable findings.
  • Blacksmith Testbox changed gate: tbx_01kwn0fe5vm4gevwq0c3vks9r9, exit 0.

JSONL partial-tail parsing is unrelated and unchanged.

Impact and severity

Intermittent false-negative QA Smoke CI results for native /stop recovery proof. No production native-command regression is indicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PR

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions