Skip to content

Phase 2: wire decideLoopContinuation + classifyCompletionState#92

Merged
Pterjudin merged 1 commit into
mainfrom
phase2/wire-loop-continuation-classify
Jul 23, 2026
Merged

Phase 2: wire decideLoopContinuation + classifyCompletionState#92
Pterjudin merged 1 commit into
mainfrom
phase2/wire-loop-continuation-classify

Conversation

@Pterjudin

Copy link
Copy Markdown

Summary

  • Route iteration-cap checks through decideLoopContinuation + shouldEscalateModel (replacing inline escalate/stop branch)
  • Route post-tool-call continuation through decideLoopContinuation (replacing updateConsecutiveToolErrors inline path)
  • Route _runToolCall outcomes through classifyCompletionState for interrupted/completion routing
  • Preserve behavior for escalation messages and counter resets (including uniform post-escalation reset via computePostEscalationCounters)

Test plan

  • npm run transpile-client
  • npm run test-cortexide-qa255/255 (113 Phase 0/1 + 142 Phase 2)
  • npm run buildreact
  • Manual: agent mode with failing tools → verify escalation/halt messages still correct
  • Manual: interrupt mid-tool → verify loop stops cleanly

Made with Cursor

Route iteration-cap stops, post-tool continuation, and tool-call completion through the tested Phase 2 pure decision functions in chatThreadService.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pterjudin
Pterjudin merged commit 6624f1c into main Jul 23, 2026
14 of 26 checks passed
@Pterjudin
Pterjudin deleted the phase2/wire-loop-continuation-classify branch July 23, 2026 15:08
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