Skip to content

fix(omp): keep parent non-idle while internal task subagents run (port of upstream #3371) - #29

Merged
github-actions[bot] merged 2 commits into
internal/mainfrom
omp-idle-gate-3371
Aug 21, 2026
Merged

fix(omp): keep parent non-idle while internal task subagents run (port of upstream #3371)#29
github-actions[bot] merged 2 commits into
internal/mainfrom
omp-idle-gate-3371

Conversation

@joeshull

@joeshull joeshull commented Aug 21, 2026

Copy link
Copy Markdown

Upstream issue: getpaseo#2232
Upstream pull request: getpaseo#3371
Upstream head repository: jasonhnd/paseo
Upstream head: fa9fc5e

Direct import of upstream getpaseo#3371. Both commits are @jasonhnd's, unmodified: this branch is that pull request's head commit exactly, so the fork and upstream patch sets are identical in content and order.

What it does

OMP can end the parent model loop (agent_end + !isStreaming && !isCompacting) while internal task children are still writing, so Paseo marked the parent idle while work continued (upstream getpaseo#2232).

  1. Idle gate. Do not complete the turn until the subagent index reports no running children.
  2. Snapshot reconcile. A successful get_subagents reply lists only still-running children, so an id that previously appeared and is now missing is treated as completed. A child seen only via lifecycle is not killed by an empty first reply.
  3. Deferred task cards. OMP's task tool_execution_end is a dispatch acknowledgement, not a result, so the card stays open until the index has a linked child and none are running.

Adds validated get_subagents RPC support to the CLI runtime.

Why import it now

Upstream getpaseo#3371 is still open and changes the same function as #25. Importing it first keeps the two changes from colliding and lets #25 rebase onto internal/main afterwards. Upstream getpaseo#3371 replaces the closed upstream getpaseo#2245, which review rejected because snapshot reconcile never treated a disappeared get_subagents id as terminal — the stuck-running-parent risk this rewrite fixes.

Preflight

node scripts/check-upstream-port.mjs \
  --candidate omp-idle-gate-3371 \
  --upstream-ref 23853a1515d374b873f9d5749b532a81f022b1cd \
  --integration-ref origin/internal/main \
  --allow-path packages/server/src/server/agent/providers/omp
Upstream port preflight passed: 9 changed path(s).

The branch is based directly on upstream main at 23853a151 (verified an ancestor of fetched getpaseo/paseo:main), does not descend from internal/main, and changes only packages/server/src/server/agent/providers/omp.

Verification

Run against this repository's dependencies:

  • npx vitest run packages/server/src/server/agent/providers/omp — 19 files, 127 tests pass
  • npm run lint on the omp provider — 0 warnings, 0 errors
  • npm run format:check — clean

npm run typecheck on the upstream base reports missing-module errors for @replit/codemirror-lang-csharp and @paseo/plugin, which come from resolving this checkout's node_modules against an older lockfile, not from these commits. CI installs from the merge result and is the authority here.

I did not re-verify against a live OMP process; see the upstream pull request for the author's own QA.

Merge order

Merge this first. #25 bounds all three of the gate's wait conditions, including the subagent wait added here, and rebases onto internal/main once this lands.

OMP can end the parent model loop while `task` children are still writing.
Do not complete the Paseo turn until the subagent index reports no runners.

Reconcile successful get_subagents replies so listed ids stay running, and
treat absence of a previously listed id as completed. Never-listed lifecycle
children stay running so an empty first snapshot cannot fake-idle the parent.

Closes getpaseo#2232
OMP emits tool_execution_end for `task` as a dispatch ack, then starts
children. Keep the parent call running and settle it from the subagent
index once a linked child exists and none remain running. completeTurn
force-settles a task that never produced a child.

Wire-order tests emit the result before subagent_lifecycle started.
@joeshull
joeshull force-pushed the omp-idle-gate-3371 branch from 750be93 to fa9fc5e Compare August 21, 2026 21:59
@github-actions
github-actions Bot merged commit 20ded45 into internal/main Aug 21, 2026
20 of 24 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.

2 participants