Repository navigation
fix: stop delegated model runs after a task outcome is decided - #81
jerelvelarde merged 2 commits into
Conversation
jerelvelarde
left a comment
There was a problem hiding this comment.
The stop-after-outcome fix is valuable: all 8 focused model outcome/worker tests pass, including one provider request and persisted review/input/completion states. The description covers verification and integration limits; no new security blocker found. Please resolve the production conflict in apps/server/src/engine/model.ts against current main, retaining its current workspace reads, provider-specific computer instructions and cancellation/browser guards while adding shouldContinue. Rerun CI on the integrated head; the old-head browser jobs currently fail.
jerelvelarde
left a comment
There was a problem hiding this comment.
Re-reviewed author integration: model.ts conflicts are resolved and current main merges cleanly. Nine model outcome/worker tests passed; finish/input/review outcomes stop follow-up turns while action replay, workspace/provider instructions, cancellation and browser guards remain intact. Clear value and described limits, no actionable security/correctness blocker. Merge remains gated on current exact-head required CI.
Calling
finish_task,ask_user, or a prepare tool sets a task outcome, but the model loop still requests another turn. If that request fails after its retries, a completed task or a task awaiting input/review becomesfailedinstead. A completed task can even have a “Work completed” event alongside its failure status.Stop the delegated model loop between turns once an outcome is set. The current turn's tools still settle normally. A replayed, already-successful reviewed action does not set an outcome, so the model can continue using its saved receipt. Cancellation, lease checks and provider errors before an outcome retain their existing handling.
Verification on Node 24.21.0 / pnpm 11.19.0:
Tests use local fixtures only; no live model API or Google writes were exercised. Platform exports do not verify native device behavior.
Follow-up verification — 2026-10-06
Resolved the production conflict against main
73a7149, keeping current workspace reads, provider-specific computer/search instructions, cancellation and browser guards, plus the outcome stop predicate. Full suite: 392 tests passed. Root/mobile/worker typechecks, lint and server build pass on Node 26.8.2. Browser and container checks are delegated to the new CI run.