Skip to content

Comments

intake(lote-A): import upstream PR #1840#1

Open
nsalvacao wants to merge 4 commits intobaseline/develop-sync-2026-02-17from
intake/lote-A-pr-1840
Open

intake(lote-A): import upstream PR #1840#1
nsalvacao wants to merge 4 commits intobaseline/develop-sync-2026-02-17from
intake/lote-A-pr-1840

Conversation

@nsalvacao
Copy link
Owner

@nsalvacao nsalvacao commented Feb 17, 2026

Upstream intake PR for isolated review.

Checklist:

  • Automated checks green
  • Bot review comments triaged
  • Manual review complete
  • Safe for baseline merge

AndyMik90 and others added 4 commits February 15, 2026 17:31
…lanning (AndyMik90#1828)

The terminalEventSeen Set in TaskStateManager was never cleared when a task
was restarted. When spec_runner.py emits PLANNING_COMPLETE, the taskId is
added to terminalEventSeen. If the subsequent coding process (run.py) fails,
handleProcessExited() returns early because terminalEventSeen.has(taskId)
is true, silently swallowing the PROCESS_EXITED event. The XState actor
never transitions, leaving the task permanently stuck in 'coding' state.

Additionally, lastSequenceByTask from the old process would cause events
from a new process (starting at sequence 0) to be dropped as duplicates.

Fix: Add prepareForRestart(taskId) method that clears both terminalEventSeen
and lastSequenceByTask without stopping the XState actor. Call it in all 4
locations where a new agent process is started:
- TASK_START handler
- TASK_STOP handler (so subsequent restart works)
- TASK_UPDATE_STATUS auto-start path
- TASK_RECOVER_STUCK auto-restart path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add missing prepareForRestart(taskId) call before startQAProcess() in the
TASK_REVIEW rejection handler. This is the 5th location where a new agent
process is started for an existing task, but was missed in the original fix.
Without this, if the QA fixer process crashes after a review rejection,
terminalEventSeen would cause handleProcessExited() to swallow the exit
event, leaving the task permanently stuck.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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.

2 participants