Skip to content

fix: settle helpers that were still working when a run paused - #1920

Merged
elie222 merged 2 commits into
mainfrom
codex/paused-helpers-settle
Oct 22, 2026
Merged

elie222 merged 2 commits into
mainfrom
codex/paused-helpers-settle

Conversation

@elie222

@elie222 elie222 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Why

Helpers (run_subagent) that were still working when a run paused for an approval, question or takeover kept showing as running forever, including after the run resumed or finished and after a reload. The helpers did stop, but their terminal events were queued after the executor had stopped reading the runtime stream, so the last stored event for each one stayed running. Every pause left another set of spinners behind.

What changed

  • The executor tracks the helpers it has stored as running and stores the existing failed / stopped event for any that are unfinished before a pause and before finishing, with exit cleanup covering cancellation and runtime failures.
  • The shared message projection and the web and mobile reducers settle a run's running helpers when the run pauses or ends, so helpers already stored as running before this fix also stop spinning. Helpers started after a resume still show as running.
  • Thread snapshots load pause events and pass the active runs into the projection, so reloads settle stale helpers in bot and group chats.

The only visible change is that stopped helpers use their existing stopped state. No copy, layout, migration or auth changes.

Tests

Regression tests were written first and failed before the fix: helper persistence on pause, finish, failure and cancel (executor); projection on input pause, takeover pause, completed, failed and cancelled without reviving old helpers on resume (core, web, mobile); and snapshot reload settlement in bot and group chats, including a resumed run with fresh helpers. All touched-package unit suites, typechecks and Biome pass.

Fixes #1902

The executor stopped reading runtime events on pause, leaving helper terminal events in an unread queue and their persisted state running. Settle unfinished helpers before pauses and finalization and during exit cleanup. Guard live and reloaded projections with run state and pause history while keeping new helpers active after resume.

Fixes #1902
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
rakazo-www Skipped Skipped Oct 22, 2026 11:31pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed and no new blocking issues were found.

Summary

Stops unfinished helpers before a run pauses or ends, and settles stale helper cards in shared projections, web, mobile, and snapshot reloads.

  • The executor saves unfinished helpers as stopped when a run pauses or ends.
  • Thread views settle helpers when their run pauses or ends.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Helper stored as running] --> B[Run pauses or ends]
  B --> C[Build stopped helper block]
  C --> D[Save helper event and message together]
  D --> E[Remove helper from cleanup tracking]
  D --> F[Notify chat]
  G[Pause or terminal event] --> H[Shared and client projections settle running helpers]
  I[Snapshot reload] --> H
Loading

Reviews (2) · Last reviewed commit: "fix: settle helpers after cancellation a..." · Reviewed by Greptile

Comment thread packages/adapters/src/executor.ts Outdated
Comment thread packages/adapters/src/executor.ts Outdated
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Playwright screenshots

No new feature frames; gallery is suite-vs-main drift.

Open screenshot gallery · Dashboard · CI run

Updated for commit 7ae4616.

@elie222
elie222 merged commit cfc2053 into main Oct 22, 2026
26 checks passed
fgbhhnnn added a commit to fgbhhnnn/rakazo that referenced this pull request Oct 23, 2026
Keeps fork dispatcher design (hidden workers, no Stop, busy indicator, owner-managed
deployment settings); takes upstream bug fixes from elie222#1685/elie222#1891/elie222#1920/elie222#1899 and the
interactive/background worker lanes with hidden workers forced onto the background lane.

This branch was previously deployed

1 inactive deployment
Preview — 7ae46167 Deployed Oct 22, 2026 by vercel[bot]
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.

[Bug]: Helpers that were working when a run paused show as running forever

1 participant