Skip to content

Hold a background task's ACP prompt into the next turn instead of cancelling it - #5302

Merged
trissim merged 1 commit into
mainfrom
fix/goal-stall-pauses
Nov 28, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/goal-stall-pauses

Conversation

@trissim

@trissim trissim commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

#5264 bounded BackgroundTaskWaitPhase with a 180 s silence budget whose expiry
sent session/cancel and failed the turn with ModelStalled. On agy, "reply, then
silence while a background task runs" is how a model waits on its own pytest or
NRA, so every wait over 3 min killed the task (agy: "All your subagents and
background tasks have been stopped due to user force cancellation") and the
failed attempt left the goal in BlockedGeneration. Live on ts-gaming: pm-pbt
idle 3h53m after 08:25, pm-neuro-arch blocked since 13:09.

agy takes concurrent session/prompt on a live session (AcpLivePrompt.steer) and
routes frames per session, so a held-open prompt never wedges agy; it only kept
Core's turn from ending. The wedge 12314 asked to remove was the thread, never
the task.

  • TurnPhase.silence_ending: past its budget a phase picks its ending through
    SilenceEndings; the default stalls, BackgroundTaskWaitPhase holds. Its
    stall_message and stall_reason go.
  • AcpTurnEnding family (Settled, Held, Stalled) owns how a turn releases its
    live prompt and which terminal events it reports; the stall copy of the
    settle path goes.
  • AcpTurnPrompt (NoLivePrompt, AcpLivePrompt): the next turn continues a held
    prompt with its input as a steer, or opens one.
  • AcpLivePrompt keeps one read across next_frames calls, so a turn that stops
    reading never takes a frame with it.
  • POST_REPLY_STALL_SECONDS -> POST_REPLY_HOLD_SECONDS.

Verification: tests/test_antigravity_acp_backend.py 19/19 (incl. the 7 steering/turn tests); 19 files naming turn_phase/close_idle 311 passed, 1 pre-existing red on main (test_pi_rpc_nominal.py:74 CompactionPhase.pauses_input_clock); repository guards 50/50 (test_goal_runtime_annotations.py fails collection on main: Thread.wake_context deleted by #5298).

…celling it

#5264 bounded BackgroundTaskWaitPhase with a 180 s silence budget whose expiry
sent session/cancel and failed the turn with ModelStalled. On agy, "reply, then
silence while a background task runs" is how a model waits on its own pytest or
NRA, so every wait over 3 min killed the task (agy: "All your subagents and
background tasks have been stopped due to user force cancellation") and the
failed attempt left the goal in BlockedGeneration. Live on ts-gaming: pm-pbt
idle 3h53m after 08:25, pm-neuro-arch blocked since 13:09.

agy takes concurrent session/prompt on a live session (AcpLivePrompt.steer) and
routes frames per session, so a held-open prompt never wedges agy; it only kept
Core's turn from ending. The wedge 12314 asked to remove was the thread, never
the task.

- TurnPhase.silence_ending: past its budget a phase picks its ending through
  SilenceEndings; the default stalls, BackgroundTaskWaitPhase holds. Its
  stall_message and stall_reason go.
- AcpTurnEnding family (Settled, Held, Stalled) owns how a turn releases its
  live prompt and which terminal events it reports; the stall copy of the
  settle path goes.
- AcpTurnPrompt (NoLivePrompt, AcpLivePrompt): the next turn continues a held
  prompt with its input as a steer, or opens one.
- AcpLivePrompt keeps one read across next_frames calls, so a turn that stops
  reading never takes a frame with it.
- POST_REPLY_STALL_SECONDS -> POST_REPLY_HOLD_SECONDS.
@trissim
trissim merged commit 2c52199 into main Nov 28, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant