Skip to content

fix(server): workflow ceilings, stop run picks, subagent waits and review-guide settings (batch 1855 core) - #747

Merged
trancong12102 merged 3 commits into
mainfrom
fix/batch-1855-server-core
Nov 24, 2026
Merged

trancong12102 merged 3 commits into
mainfrom
fix/batch-1855-server-core

Conversation

@trancong12102

@trancong12102 trancong12102 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Follow-ups queued from the upstream syncs of 2026-11-24 and from Batch fix 1352, shared server core and orchestration group.

Problems and fixes

  • Workflow agent steps on a linked environment ran at full access above an administrator's ceiling. WorkflowAgentLinks hardcoded full-access limits. Link calls now carry this machine's limits.maxRuntimeMode; the peer's link access still bounds them.
  • Async-question answers with files but no answers lost their recorded answer, and files followed client key order (unknown question ids still went out). The answer is recorded when either is present; files go out in question order; unknown ids are dropped (message-capability requests).
  • Stop, Force stop, background-work checks, settlement, thread.settle and idle compaction picked runs by ordinal tail, so a steered (cancelled-before-start) tail or a resumed older run made them act on the wrong run. They now use latestExecutedRun / runRanAfter. The client's Stop fallback for servers without threadStop keeps those servers' own rule but no longer trips on a queued follow-up. IdleCompactionService now asks the store for the run that ran last plus queued/waiting runs.
  • Claude: a foreground sleep timer Claude moved to the background was never awaited, and the timer check read the 1,000-char preview. The roster path now marks it awaited, judged on the whole command.
  • Grok blocking polls and Codex waits on an earlier run's child were not "Waiting on N". A blocking get_command_or_subagent_output (positive timeout_ms) or wait_commands_or_subagents marks the child awaited while the call runs (canonical name read from _meta["x.ai/tool"], null timeout = absent), cleared on return, turn end and prompt settle. A new optional OrchestrationV2Subagent.awaitedByRunId (absent from older servers) lets desktop and mobile count an earlier run's children that the live run waits on, from the projection's subagents, without a timeline scan.
  • Claude review guides read user settings and the model route from the PR checkout. They now read from the project; a relative CLAUDE_CONFIG_DIR resolves there.
  • pull_request_review blamed the diff when the head had moved; it now reports the moved head. The evals harness accepts SHA prefixes like the product (isHeadSha moved to @onicode/shared/git) and refuses missing or blank SHAs as the schemas do.
  • Favicon lookup failed on names the filesystem rejects (ENAMETOOLONG/EINVAL); it now tries the next icon. HTTP readiness read the body outside the probe timeout, uncapped; the body is read inside it, capped at exactly 64 KiB.
  • Tests: deterministic Resume-behind-promoted-steer race (fails without 8724bb6), two threads on one Codex app-server, Claude nested task without spawn_depth. ProjectionStore no-unmodified-loop-condition warning fixed.

Every new test row was run against the code without its fix and failed.

Council review (Antigravity Gemini 4 Neon, xhigh)

Round 1:

  • P2 client Stop fallback used runs.at(-1): fixed for the queued-follow-up case; kept the old server's own run rule because any other id is refused by those servers ("not interruptible").
  • P2 thread.settle passed the ordinal tail: fixed (latestExecutedRun), row in runtimeLayer.test.ts.
  • P3 IdleCompaction ordinal pick: fixed in IdleCompaction and the service's takeover check.
  • P2 Grok timeout_ms: null and display titles: fixed, rows from recorded frames.
  • P2 ACP continuation settle kept waits: fixed through one settlePrompt helper used by both deferral paths.
  • P3 a call's wait set never shrank mid-call; terminal subagents kept awaitedByRunId: fixed (row "the poll drops its timeout").
  • P2 evals blank SHA regression: fixed, rows added.
  • P3 readiness cap untested / inclusive: exact cap, rows added; this also restored body draining for callers without accept.
  • Asked whether Claude TaskOutput polling was skipped on purpose: yes, Claude Code removed TaskOutput (2.1.331 binary, SDK 0.3.329 types).

Round 2:

  • P1 IdleCompactionService still queried includeLatestRun without queued/waiting statuses: fixed; the service test's store mock now filters like the store, and the new row fails without the fix.
  • P3 blank metadata tool name: falls back to the title.
  • P3 readiness orElseSucceed also hides a mid-body reset for callers without accept: not changed. Readiness for them is a 200 response; a body reset after headers does not make the server less ready, and callers with accept still retry on the empty body.
  • P2 no test drives settlePrompt on a deferred Grok turn or a child ending while awaited: left untested; the mock flavor does not defer finalization and adding that harness path is large. Both settle paths share one helper.
  • P3 a blocking poll that returns the child's terminal output emits a running row just before the terminal one: left; it is one extra update in the same event.

Rejected after triage

  • Forgejo / Origin hasCommit: those forges have no "is this commit in this PR" endpoint; maintainer policy adapts only GitHub and GitLab.
  • Cursor background children: real (SDK 1.4.2 returns detached runInBackground children as a successful task call and the adapter marks them completed), but fixing it needs a recorded Cursor stream of child completion; no Cursor CLI or account on this machine. Queued.
  • Muse "Waiting on N": the Muse protocol carries no blocking-vs-async signal (MuseItem, canWaitForSubagents: false). Hard limit.

Model and harness: Claude Opus 5.5 in Claude Code (Onicode), Antigravity Gemini 4 Neon for council review.

🤖 Generated with Claude Code

@trancong12102
trancong12102 force-pushed the fix/batch-1855-server-core branch from 9721e72 to 52fd9c5 Compare November 24, 2026 12:57
trancong12102 and others added 3 commits November 24, 2026 20:13
…nd review guides

- Workflow agent steps on a linked environment carry this machine's runtime-mode ceiling.
- An async-question answer with only files keeps its answer; files follow question order and
  unknown question ids are dropped.
- Stop, Force stop, background-work checks and settlement pick the run that ran last, not the
  highest ordinal.
- Claude: a foreground sleep timer moved to the background counts as awaited, judged on the
  whole command rather than its preview.
- Grok: a blocking output poll marks the child awaited; Codex: a wait on an earlier run's child
  counts for the waiting run (optional awaitedByRunId).
- Claude review guides read user settings and the model route from the project, not the PR
  checkout.
- pull_request_review reports a moved head before an unplaceable line; evals accept SHA
  prefixes like the product.
- Favicon lookup skips names the filesystem rejects; HTTP readiness bounds and caps the body.
- Deterministic test for the Resume-behind-promoted-steer race; ProjectionStore lint warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ss cap, evals SHA rules

- Stop's old-server fallback, thread.settle and idle compaction judge the run that ran last or
  the server's own rule for queued follow-ups.
- Grok waits read the canonical tool name and treat a null timeout as absent; each update
  replaces a call's waits, a settled continuation prompt clears them, and terminal subagents
  drop awaitedByRunId.
- Readiness probes read the body again (capped to 64 KiB exactly) inside the per-probe timeout.
- The evals harness refuses a missing or blank merge SHA like the product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uns from the store

Council round 2: the service's records query asked for the highest-ordinal run and left out
queued and waiting runs, so the run-picking fix never saw them against the real store. Grok's
canonical tool name falls back to the title when the metadata name is blank.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trancong12102
trancong12102 force-pushed the fix/batch-1855-server-core branch from 52fd9c5 to 32f9a33 Compare November 24, 2026 13:13
@trancong12102 trancong12102 changed the title fix(server): batch 1855 core follow-ups for workflows, stops, waits and review guides fix(server): workflow ceilings, stop run picks, subagent waits and review-guide settings (batch 1855 core) Nov 24, 2026
@trancong12102
trancong12102 merged commit 521da14 into main Nov 24, 2026
18 checks passed
@trancong12102
trancong12102 deleted the fix/batch-1855-server-core branch November 24, 2026 13:33
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