Repository navigation
fix: goals created mid-turn stop after delegated work - #183706
Merged
fuller-stack-dev merged 13 commits intoOct 29, 2026
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
HermanZeng
marked this pull request as ready for review
October 25, 2026 16:22
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
Member
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 30, 2026
Keep Goals created during admitted chat turns connected to the existing continuation owner. Bind the newly created Goal to its matching run, session, agent and physical store. Resume through the existing queue only after committed return, preserving current operator authority, cancellation and budget checks. No new scheduler or autonomous command engine. Maintained source-Gateway regressions cover direct, delegated and genuinely queued Goal creation, exactly one continuation and final subscriber/history delivery, sibling denial, provider cancellation after revocation, and a positive publication control with no revoked disclosure. Independent parent-red/head-green verification and exact-head CI are recorded in PR openclaw#183706. Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: yxshee <[email protected]> Co-authored-by: Masato Hoshino <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Solvely-Colin <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Shakker <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: Pat <[email protected]> Co-authored-by: Akshit Khokhani <[email protected]> Co-authored-by: HeZzz <[email protected]> Co-authored-by: jalehman <[email protected]> Co-authored-by: xiaopan-xydt <[email protected]> Co-authored-by: Milan Patel <[email protected]> Co-authored-by: MoerAI <[email protected]> Co-authored-by: Jay Zhou <[email protected]> Co-authored-by: KJH <[email protected]> Co-authored-by: Ted Li <[email protected]> Co-authored-by: libaojiang <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: Mitchell Etzel <[email protected]> Co-authored-by: xydigitLybnnnn <[email protected]> Co-authored-by: gideonpraise <[email protected]> Co-authored-by: jbax1899 <[email protected]> Co-authored-by: Edo Sulaiman <[email protected]> Co-authored-by: Jason O'Neal <[email protected]> Co-authored-by: 555aaditya <[email protected]> Co-authored-by: Max Johnson <[email protected]> Co-authored-by: LiuwqGit <[email protected]> Co-authored-by: YangManBOBO <[email protected]> Co-authored-by: Terwox <[email protected]> Co-authored-by: Glucksberg <[email protected]> Co-authored-by: Francisco Novella Fletcher <[email protected]> Co-authored-by: Alix-007 <[email protected]> Co-authored-by: PollyBot13 <[email protected]> Co-authored-by: Arthur Pinheiro <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: HootRock <[email protected]> Co-authored-by: hehuang139 <[email protected]> Co-authored-by: Taksh <[email protected]> Co-authored-by: sunlit-deng <[email protected]> Co-authored-by: Leon-SK668 <[email protected]> Co-authored-by: potoior <[email protected]> Co-authored-by: Michel Settembrino <[email protected]> Co-authored-by: ayaangazali <[email protected]> Co-authored-by: Eric Cai <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: Chris Eckert <[email protected]> Co-authored-by: xydigitLybnnnn <[email protected]> Co-authored-by: Miles <[email protected]> Co-authored-by: Brian McGuire <[email protected]> Co-authored-by: Shoaib <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> Co-authored-by: Takhoffman <[email protected]> Co-authored-by: JIRBOY <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: MumuTW <[email protected]> Co-authored-by: stevenlee-oai <[email protected]> Co-authored-by: alkor2000 <[email protected]> Co-authored-by: jacobtomlinson <[email protected]> Co-authored-by: Nicolas Keil <[email protected]> Co-authored-by: Holger Gruenhagen <[email protected]> Co-authored-by: Aaron08140 <[email protected]> Co-authored-by: wangmiao0668000666 <[email protected]> Co-authored-by: Andrea Sforna <[email protected]> Co-authored-by: Wesley <[email protected]> Co-authored-by: eleqtrizit <[email protected]> Co-authored-by: Sukhdeep Johar <[email protected]> Co-authored-by: creanet-64 <[email protected]> Co-authored-by: scotthuang <[email protected]> Co-authored-by: mbelinky <[email protected]> Co-authored-by: luyifan <[email protected]> Co-authored-by: Daniil Karpenko <[email protected]> Co-authored-by: HeZ2z <[email protected]> Co-authored-by: paulcam206 <[email protected]> Co-authored-by: brokemac79 <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: Anmol Bhardwaj <[email protected]> Co-authored-by: TorstenW <[email protected]> Co-authored-by: lijing <[email protected]> Co-authored-by: Krasimir Kralev <[email protected]> Co-authored-by: xialonglee <[email protected]> Co-authored-by: hugenshen <[email protected]> Co-authored-by: openclaw-agent-man <[email protected]> Co-authored-by: OpenClaw Agent Man <[email protected]> Co-authored-by: Dillon McCoy <[email protected]> Co-authored-by: Stronggenetics <[email protected]> Co-authored-by: holgergruenhagen <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: MertBasar0 <[email protected]> Co-authored-by: Avnish Kirnalli <[email protected]> Co-authored-by: Hankyeol Kyung <[email protected]> Co-authored-by: Samuel Benainous <[email protected]> Co-authored-by: chelsealong <[email protected]> Co-authored-by: shakkernerd <[email protected]> Co-authored-by: jjjhenriksen <[email protected]> Co-authored-by: Jason O'Neal <[email protected]> Co-authored-by: Vito Cappello <[email protected]> Co-authored-by: Sedrak Hovhannisyan <[email protected]> Co-authored-by: etzelm <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]> Co-authored-by: TheAngryPit <[email protected]> Co-authored-by: Jason Sy <[email protected]> Co-authored-by: Hannes Rudolph <[email protected]> Co-authored-by: Rogério Chaves <[email protected]> Co-authored-by: hannesrudolph <[email protected]> Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Dave Lauer <[email protected]> Co-authored-by: JustYannicc <[email protected]> Co-authored-by: yinx65588-boop <[email protected]> Co-authored-by: Vito Cappello <[email protected]> Co-authored-by: ceckert <[email protected]> Co-authored-by: TheAngryPit <[email protected]> Co-authored-by: wangmiao0668000666 <[email protected]> Co-authored-by: eliavb43 <[email protected]> Co-authored-by: boeingchoco <[email protected]> Co-authored-by: Aniruddha Adak <[email protected]> Co-authored-by: Eric Curtin <[email protected]> Co-authored-by: mike1122real-hub <[email protected]> Co-authored-by: ceckert <[email protected]> Co-authored-by: 杨浩宇0668001029 <[email protected]> Co-authored-by: Paul Bohm <[email protected]> Co-authored-by: ywj <[email protected]> Co-authored-by: CodeMiner-掘金安东尼 <[email protected]> Co-authored-by: JasonBuildAI <[email protected]> Co-authored-by: Jaxon Parrott <[email protected]> Co-authored-by: maliv2 <[email protected]> Co-authored-by: Mitchell Etzel <[email protected]> Co-authored-by: Beru <[email protected]> Co-authored-by: Brad Cleaver <[email protected]> Co-authored-by: SunnyShu <[email protected]> Co-authored-by: JasonBuildAI <[email protected]> Co-authored-by: Scott Hanselman <[email protected]> Co-authored-by: Zn <[email protected]> Co-authored-by: Vitor Cepeda Lopes <[email protected]> Co-authored-by: Links <[email protected]> Co-authored-by: Erick Kinnee <[email protected]> Co-authored-by: sallyom <[email protected]> Co-authored-by: nxmxbbd <[email protected]> Co-authored-by: Mitchell Etzel <[email protected]> Co-authored-by: joshavant <[email protected]> Co-authored-by: ruel225 <[email protected]> Co-authored-by: Pavel Zun <[email protected]> Co-authored-by: xpeng5278-web <[email protected]> Co-authored-by: LiLan0125 <[email protected]> Co-authored-by: dwc1997 <[email protected]> Co-authored-by: ablake4427 <[email protected]> Co-authored-by: SunnyShu <[email protected]> Co-authored-by: Harjoth Khara <[email protected]> Co-authored-by: Aniket Kumar <[email protected]> Co-authored-by: ferres <[email protected]> Co-authored-by: htuyer121 <[email protected]> Co-authored-by: zijunl <[email protected]> Co-authored-by: Wang Rui <[email protected]> Co-authored-by: Brandon Julio Thenaro <[email protected]> Co-authored-by: rodricksz4h5 <[email protected]> Co-authored-by: RJ <[email protected]> Co-authored-by: shannon0430 <[email protected]> Co-authored-by: shannon0430 <[email protected]> Co-authored-by: kybrcore <[email protected]> Co-authored-by: Victor <[email protected]> Co-authored-by: momothemage <[email protected]> Co-authored-by: wuqingxuan <[email protected]> Co-authored-by: xiabee <[email protected]> Co-authored-by: Yuaneen <[email protected]> Co-authored-by: CHANGAO MA <[email protected]> Co-authored-by: Cameron Vetter <[email protected]> Co-authored-by: Dmitriy <[email protected]> Co-authored-by: 肖盼0668001048 <[email protected]> Co-authored-by: AmelioMansour <[email protected]> Co-authored-by: mikasa0818 <[email protected]> Co-authored-by: L4XB <[email protected]> Co-authored-by: gloss-dandelion-cult <[email protected]> Co-authored-by: Daniil Karpenko <[email protected]> Co-authored-by: dankarization <[email protected]> Co-authored-by: Vishal Doshi <[email protected]> Co-authored-by: Hosung Park <[email protected]> Co-authored-by: ryan-dyer-sp <[email protected]> Co-authored-by: Alex Babkin <[email protected]> Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: felirami <[email protected]> Co-authored-by: dankarization <[email protected]> Co-authored-by: Daniil Karpenko <[email protected]> Co-authored-by: serg0x <[email protected]> Co-authored-by: Dylan Harrington <[email protected]> Co-authored-by: Ricardo Almeida <[email protected]> Co-authored-by: quqi1599 <[email protected]> Co-authored-by: Chuanlei Guo <[email protected]> Co-authored-by: Max Xu <[email protected]> Co-authored-by: Miguel Branco <[email protected]> Co-authored-by: Seth Ratner <[email protected]> Co-authored-by: fatherkam <[email protected]> Co-authored-by: Deltawerks <[email protected]> Co-authored-by: Johan Rocuts <[email protected]> Co-authored-by: lonexreb <[email protected]> Co-authored-by: goutamadwant <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]> Co-authored-by: Sebastien Tardif <[email protected]> Co-authored-by: 0668000539 <[email protected]> Co-authored-by: LeizhenZhang <[email protected]> Co-authored-by: Heming Zeng <[email protected]> Co-authored-by: pstarkgit <[email protected]> Co-authored-by: Leo Stehlik <[email protected]> Co-authored-by: 宗佐 <[email protected]> Co-authored-by: songc <[email protected]> Co-authored-by: liqiang2 <[email protected]> Co-authored-by: Omar Shahine <[email protected]> Co-authored-by: Demos Ra <[email protected]> Co-authored-by: Sebastien Tardif <[email protected]> Co-authored-by: xyi74976-del <[email protected]> Co-authored-by: 肖盼0668001048 <[email protected]> Co-authored-by: LinzeShi <[email protected]> Co-authored-by: SC-10749 <[email protected]> Co-authored-by: Jaxon Parrott <[email protected]> Co-authored-by: Jim Lui <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: SeungTaek Lim <[email protected]> Co-authored-by: Zimo Xu <[email protected]> Co-authored-by: Matt Schwartz <[email protected]> Co-authored-by: MarMarLabs <[email protected]> Co-authored-by: bajiaoshan <[email protected]> Co-authored-by: Massimo Balestrieri <[email protected]> Co-authored-by: licheer-zte <[email protected]> Co-authored-by: PollyBot13 <[email protected]> Co-authored-by: Mike <[email protected]> Co-authored-by: Nice De Cc <[email protected]> Co-authored-by: InsanusMokrassar <[email protected]> Co-authored-by: Andrew Bowlds <[email protected]> Co-authored-by: ben.li <[email protected]> Co-authored-by: Yun. <[email protected]> Co-authored-by: yinx65588-boop <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> Co-authored-by: amittell <[email protected]> Co-authored-by: grootbro <[email protected]> Co-authored-by: qingminlong <[email protected]> Co-authored-by: levonti <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #183705
Current published candidate
bd1798a, tree 76c97d0aa721ee59884375ebc7cd3b77c2130d16, preserves HermanZeng's published history. Its parent 4f3d736 integrates the previous published 895 head with main 90a5029. The conflict resolution retains both sets of Goal-test imports and all of main's continuation-authority behavior.
Against that main, the PR remains nine Goal production/test/helper paths (+982/-23), with no configuration, dependency or test-budget allocation. The final follow-up removes only 11 lines of fully subsumed assertions: the later, broader revoked-stream check and identical provider counters still run after a real positive publication. All distinct early history, chat-silence, sibling-denial and provider-cancellation checks remain.
Verification and remaining merge gates
These are source-Gateway tests with scripted external-provider decisions, not new shipped-runtime, hosted-model or Windows proof. Historical failed exercises and their limitations remain below. Merge remains held for complete API review and current-head CI.
Historical published evidence and failed CI — not current-head results
Historical published 895 evidence
The following successful CI evidence belongs to head 895, not the current bd candidate.
Closes #183705
Historical integration
Published head 895f1f5, tree 2475e5698c8b199288c63b5e909e49062bfd7749, is a normal merge of published 461391d and pinned main 8a3c02c. HermanZeng's published history is preserved.
Main has fixed both failures from CI run 40800636327: #187162 restores its 6,320,000 test-line ceiling, and #187144 supplies the required braces in the inherited Slack-route test. The advisory max-lines warnings were not the lint failure. This integration takes both upstream fixes unchanged. The obsolete unpublished local repair was discarded before publication; this PR adds no budget allocation or admission-test change.
Against the pinned main, the scope remains the same nine Goal production/test/helper files, all byte-identical to the published 461391 candidate. The actual native counter on this integrated tree passes at 6,246,948 / 6,320,000, with 73,052 remaining under main's unchanged ceiling. No tests were deleted, moved, minified or skipped.
Verification and limits
All wording and counts below refer to their named historical candidates. The current published head and CI status are identified above.
Closes #183705
What this fixes
A Goal created during an admitted chat turn can stop after delegated work returns. The change binds that Goal to the existing return owner while preserving committed-yield, session, Stop, budget and current-operator checks. It adds no scheduler or autonomous command engine.
Historical correction and integration
Candidate: 461391d (tree f9a603610c6ad92a94d53a621483a9db0f50d2d5). Its direct parent is the required main-integration merge 5090795, whose ordered parents are 70d9f73 and main cb5a438.
HermanZeng's original history is preserved. The required main merge resolved two actual conflicts: it retains main's existing test-line ceiling and its current real actor-admission consumer fixture, including every distinct failure, transcript, registry and no-model-execution assertion. No unrelated production change was authored.
Verification
Exact-candidate independent review: READY for preparation at 461391d, with both coverage gaps and the obsolete context-read mock resolved. CI: run 40800636327 completed with two independent failures; this is not an all-green result. Production/test types, Goal runtime checks, security and dependency checks passed. No merge is implied.
src/agents/tools/sessions-send-tool.admission.test.ts:722, in a file unchanged from main. The two max-lines annotations are warnings, not this failure's cause.Historical hosted-driver failures remain failures; real-model revocation/reassignment was not exercised, and the earlier Windows alias-close timeouts are not claimed repaired by these source checks.
Prior-head evidence and retained failure history
The following text is the prior published description. Its “current” wording applies only to its named historical commits, not to the candidate above.
Closes #183705
What Problem This Solves
An unfinished Goal created during a chat turn can stop after delegated work returns. Bind the actual newly created Goal to the existing admitted return owner, retaining committed-yield, current-session, cancellation and operator-authority checks.
Evidence
Historical budget-only follow-up
Current head
03b8a7485c6f3ffd86f6c1082413989d4d5ac51d, tree3035ced419595b71cd357cfe0ef281bcfd9fab6e, has the single published parent583ffe10b822eb26dd1133f322bd71c148bfb839. Only the test-line ceiling changed;all production/test blobs and the counting/authority contracts remain unchanged.
The three scoped session PRs now deliberately use identical 6,313,000
single-line ceilings. Two latest actual comparison runs measured
6,311,267 / PR delta +617 and 6,311,148 / delta +498, respectively; each still
exceeded its prior small ceiling by 90 after queue-time base movement. This
does not invent a completed failure for this PR's then-running parent check.
All original failures and pending-state observations are retained below.
Same-pattern Git numstat checks confirm the three retained test additions occupy
disjoint paths and total 617 + 498 + 694 = 1,809. Both observed CI totals
minus their PR deltas imply 6,310,650, so the explicit planning is
6,310,650 + 1,809 + 541 = 6,313,000. This is arithmetic, not an independent
main measurement or combined-tree/runtime test. The bounded one-time 541 reserve
addresses observed queued-base movement, and identical budget bytes avoid mutual
scalar conflicts between these changes. No automatic increase or future-fit
guarantee is introduced. The native owner permits manual increases with a PR
justification; no coverage, checker, assertion or timeout was removed.
This unchanged corpus retains its actual native count 6,311,232, giving
arithmetic slack 1,768 under the new ceiling. The native scalar parser,
identical-byte/unchanged-corpus checks and whitespace checks passed; the count
was reused rather than newly executed. Normal commit hooks ran. Independent
P0-P3 review of all three budget-only deltas and the helpers found no actionable
finding (Codex-app narrative assessment, inherited model identity unverified;
not CLI/helper attestation). New-head CI remains an independent gate.
The model evidence stays bound to
cba507: independently confirmed mid-turn Goalcreation, a real child/yield, restricted-member sibling denial, one automatic
continuation, and the final reply published/persisted. The combined driver still
exited 1 and remains failed because of its documented chat-vs-durable-message
observation mismatch. B was not run; real-model revocation/reassignment proof
remains missing. No new model call, accounting reset or new-head runtime proof
is claimed. Both older failed model attempts and Windows timeouts remain below.
Retained prior-head implementation, validation and failed proof history
The following description is retained as a historical record for its named commits. Its original “current”, “now” and “final” wording refers to those earlier candidates, not to the integration identified above. Earlier failures remain failures; earlier green CI is not current-head CI.
Closes #183705
What Problem This Solves
An unfinished Goal created during a chat turn can stop after delegated work returns. Bind the actual newly created Goal to the existing admitted return owner, retaining committed-yield, current-session, cancellation and operator-authority checks.
Evidence
Historical candidate and the measured CI budget repair
Current head: normal merge
583ffe10b822eb26dd1133f322bd71c148bfb839, treeea7f196bdf9c518bafcf569553a5a8757667b0aa, with ordered parents publishedcba507bae47aa6027fd98170bc9b7e1bdd9aecdband fixed maina9b037d25c98aefd761ddb9bdcb0636d92ebe540. This integration addresses thespecific completed CI failure below, not merely a newer main tip. No history was
rewritten and no additional functional repair was made.
The exact
cba507CI jobused synthetic merge
dc8e14af9d72904f31eff71f4ea894f6a20ba135against thatsame fixed
a9b037dbase. Its only independent failure was 6,311,232 testlines / ceiling 6,310,560 / PR delta +694 / over 672; the other red check was
the aggregate gate. All nine other independent baseline checks passed. The
maintained classifier labeled it new, not inherited or a model/runtime defect.
The original failed job and its log remain retained.
Main had replaced the old commented reserve with the single-line
6310560ceiling. Its observed check was skipped, so that scalar is not called an
independent measured main count. The normal merge was conflict-free and preserved
all incoming changes. The only manual edit raises that ceiling to 6,311,254,
exactly the retained +694 regression lines; this follows the owner's explicit
manual-increase-with-PR-justification policy. The actual local integrated native
counter passed at 6,311,232, leaving 22 slack, independently matching the
earlier CI total. No test, assertion, checker or timeout was removed or weakened.
The full new-base delta is eleven files: ten feature/test files plus the budget.
Every feature/test blob matches the reviewed
cba507candidate exactly. Theirupstream path OIDs also match between the old and fixed new base. Whitespace
checks passed, normal commit hooks ran, and independent P0-P3 integration review
found no actionable issue. It reused the prior complete feature/owner review and
independently verified every frozen blob, staged/working scope, budget and
publication route. This was a Codex-app narrative assessment with inherited
model identity unverified, not CLI/helper or enforced-isolation attestation.
Transitive upstream inputs changed. The earlier build, type/test results and
model captures retain their named source commits rather than becoming executions
of
583ffe10; no new runtime build or real-model call is claimed for this merge.New-head CI remains a separate gate.
Real-model proof: supported A facts and the remaining B gap
The real-model exercise remains bound to the tracked-clean
cba507sourceidentified in the retained record below. It made nine HTTP 200 requests with
complete output/usage retained and settled. Independent public-event and
read-only stopped-persistence checks confirmed actual mid-turn Goal creation,
one real child and correlated native yield, the real main-only member's sibling
tool denial, exactly one automatic Goal continuation, Goal completion, and the
same final text published to that member as durable
session.messageand storedon the same canonical branch. No sibling session was created.
The combined driver still exited 1 and remains failed: its final marker wait
incorrectly required text inside a terminal
chatevent after the native ownerhad already handed that text to durable
session.message. The recorded terminalevent had no message, while actual member publication and persistence contained
the exact final response. This evidence does not establish missing product
delivery; the failed result is not rewritten as a passing combined run.
B never started and the real-model revocation/reassignment proof remains
outstanding. No revocation call, retained-return cancellation or post-revocation
effect observation is claimed. Controlled response delay, native WebSocket rather
than browser proof, bounded/owned cleanup and unchanged stopped database hashes
retain their original limitations. The earlier two failed model attempts and
Windows alias-close timeouts are also preserved below. No further model attempt,
accounting reset, forced history update, hosted re-review or merge is implied.
Retained prior-head implementation, validation and failed proof history
The following description is retained as a historical record for its named commits. Its original “current”, “now” and “final” wording refers to those earlier candidates, not to the integration identified above. Earlier failures remain failures; earlier green CI is not current-head CI.
Closes #183705
What Problem This Solves
An unfinished Goal created during a chat turn can stop after delegated work returns. Bind the actual newly created Goal to the existing admitted return owner, retaining committed-yield, current-session, cancellation and operator-authority checks.
Evidence
Historical integration and proof status
Current candidate: normal merge
cba507bae47aa6027fd98170bc9b7e1bdd9aecdb,tree
62de539fe524a809e2591b7cebf8df1d9fde8cb3. Its ordered parents are98679a804ab787cb598b8d90979094da8eaf9f2cand fixed maina1859e5195f6e74f1980192bdf291c0193e940a1. No history rewrite or furthermoving-main integration was performed. The sole content conflict adopted main's
unchanged 6,310,000 test-line ceiling and complete reserve explanation; it adds
no new budget exception to this candidate.
The ten-file change remains five production owners (+72/-22) and their focused
tests/consumer fixture (net +694 test lines). Nine files are byte-identical to
the previous head. The remaining execution file retains main's optional
recoveryMemoryFlushAttemptedinput and the original Goal-return change; thefive-file production patch has the same stable patch-id before/after integration.
Transitive admission, memory-flush/overflow recovery, child wake/query, spawn and
authority-projection inputs did change upstream. This is not a claim that the
entire runtime input graph was unchanged or that old-head CI covers this merge.
Independent full ten-file P0-P3 review, including the owners/callers, found no
actionable findings. It was an approved Codex-app narrative subagent assessment
with inherited model identity unverified, not a CLI/helper pass or enforced
isolation attestation. The previous focused tests and type graphs retain their
named historical source identities below; they were not repeated just to obtain
green output on an unchanged feature delta. Current-head CI remains separate.
The integrated native test-line check passed at 6,305,277 / 6,310,000, with
4,723 slack on this fixed local tree. The integrated assertion SAFETY ratchet
also passed: 2,406 files / 5,477 grandfathered assertions. Whitespace checks
passed. These are current local checks, not an unobserved CI synthetic-merge
count or a claim of fresh current-head type-graph execution.
Exact-head shipped Gateway and real-model evidence
Normal own-worktree frozen dependency installation and the maintained CLI build
completed with Node 24.22.1 / pinned pnpm 12.15.0. The default runtime build is
not a strict typecheck. Both native producer stamps name this tracked-clean
cba507bae47aa6027fd98170bc9b7e1bdd9aecdb; effective build input signature041bb95d4bb174f564a6d94700ea08240a278839b62faa6c9847316a2a68692band runtime signature
dc0868a69fa60eb3d9a98385552761986f22a7fbbe4745eff0dc0feae1379c1dmatched their producer stamps, and native preparation required neither rebuild.
No stamp, authority check, TLS verification or production code was modified for
this proof.
A separate zero-model setup passed 46 assertions: actual administrator and two
member profiles, member read/write scopes without administrator authority, no
gateway-owner identity fallback, real public sibling-session denial, no sibling
effect, and normal owned cleanup. It made no hosted-model requests.
The subsequent real
qwen3.8-flashcombined attempt exited 1 and remainsfailed. It made nine physical HTTP 200 requests (eight parent, one child),
77,644 input / 488 output tokens, all with complete model output and reported
usage retained/settled. All content was synthetic. The native public WebSocket
client used a certificate-pinned fixture TLS front and the normal shipped
Gateway; this was not browser/Control UI, fleet, restart or real-channel proof.
Independent offline inspection of the immutable request/response captures,
actual public events and a read-only copy of stopped SQLite state nevertheless
established the following completed A flow on one canonical history branch:
(raw sequence 9), and received a correlated native
yieldedreceipt (13).sessions_createtool call (18) received the owner denial(19); the sibling database contained no session nodes.
appeared at sequence 22, the Goal completed with continuation count exactly
one, and the observed session had no active run.
the same
session.messageto both the member and administrator observers(event orders 311 / 309). It exactly matched the final retained model output.
The failed driver's final-delivery wait required the marker inside
chat final.For this same continuation run, terminal chat events did arrive (313 / 314), but
contained no message because the native owner had already handed the committed
text to durable
session.messagepublication. Native buffer/publication sourcecontracts and stopped persistence corroborate that observation-surface mismatch;
it is not evidence that the product failed to deliver the final reply. The
driver's original global failure phase was overwritten by asynchronous provider
assertions, so that saved label is not used as a precise wait-site diagnosis.
The original failed result is not rewritten into a passing combined run.
The child response was deliberately delayed only after its unmodified real body
was fully retained and usage settled, until public correlated
yielded/ activeGoal facts existed. No model decision, tool result or continuation instruction
was fabricated. This is controlled-boundary proof, not undelayed performance.
Original stopped database/WAL/SHM hashes were unchanged by independent inspection.
Owned cleanup joined with all admitted requests drained and no forced provider
abort or reported cleanup error; it does not certify global descendant exit.
B never started: no model request, role-revocation call, retained-return
cancellation observation or post-revocation final-effect proof occurred. The
original review's real-model revocation/reassignment requirement therefore remains
outstanding. Successful A observations do not close it. Both earlier failed model
attempts and both unexplained Windows configured-alias-close timeouts remain
retained below; no retry, longer timeout or green replay erases them.
Retained prior-head implementation, validation and failed proof history
The following description is retained as a historical record for its named commits. Its original “current”, “now” and “final” wording refers to those earlier candidates, not to the integration identified above. Earlier failures remain failures; earlier green CI is not current-head CI.
Closes #183705
What Problem This Solves
Fixes an unfinished Goal stopping after delegated work returns when the agent created the Goal during that same chat turn.
User Impact
Users can keep pursuing an explicitly requested Goal across a same-process child handoff without sending another message to restart it. There is no schema/configuration migration, restart recovery extension, or new autonomous capability for independent commands or scheduled turns.
Why This Change Was Made
The existing return owner captured only Goals present before execution. Keep that owner unbound for an admitted built-in chat, then bind the actual
create_goalresult once to the current run/session/agent/store. Retaining the return still requires a committed yield; the existing queue, current Goal, cancellation, budget, and authority checks continue to decide whether another turn may run.Evidence
Repair and Validation Status
Current repaired candidate:
98679a804ab787cb598b8d90979094da8eaf9f2c, integrating the final bounded snapshotf39b480c874d8acdae73f3b1c060dbd6cfc7a052. The precedingbdefe28105a066bf29a8565972140be3b947c9e4integrated the observed CI comparison snapshot23b53fd33fcd0fbaaf62546db23fb032541c9bdcintode7fed4b39fdfdd5f0b0c736d914533fbbed5e42; a subsequent upstream budget edit caused the sole conflict resolved by this final integration. Earlier,de7fed4integrated fixed maina6be2f6aee7fd9782563d54e33e4b60995853008into70159c5dc95809b55cb60713a558d871ef08ecad, retaining both upstream placement coverage and the lifecycle-generation helper at its import conflict. No history was rewritten. All nine original PR files remain byte-identical tode7fed4; the only additional changes are the consumer fixture and justified test budget below. The five production-file changes are unchanged.The focused Goal regression, type, and static gates below passed at the preceding candidate. CI subsequently found a missed consumer fixture and a test-line budget failure; their repair and the retained local failure are reported next. The additional hosted-model exercise did not satisfy all requested proof conditions. In particular, a successful shipped-runtime, real-model automatic-continuation demonstration and a real-model restricted-operator final-effect demonstration are still outstanding. These partial/failed exercises are not evidence of a newly identified production defect, and this update does not claim that all review feedback is resolved.
CI follow-up: real consumer owner and explicit test budget
CI on
de7fed4foundOperation has no controller ownerin the existing subagent cohort-conflict regression. Initially Goal-less admitted chat now enters the real Goal return owner, but that consumer fixture supplied an unregistered operation double. The fixture now creates the existing real controller operation with its captured physical store/session target, observes the real failure method through a call-through spy, and completes/joins owner settlement. Every original registry-conflict, visible-error, transcript, and no-model-execution assertion remains. No production owner or authority check was relaxed, and no Goal-wrapper mock was introduced.The corrected case passed in the original three-file infra group (7.532 s). The command as a whole returned exit 1: 43 passed, one failed, because the unmodified
refuses held row facts after configured-alias closecase timed out after 120 seconds on Windows. That same case had passed in the original CI job; this does not prove an inherited or platform-only defect. Static investigation found isolated fork workers and no new collection-time controller registration from this fixture, but the stalled await remains unidentified. No timeout was raised, test removed, or green replay substituted. The messaging test type graph, focused lint, formatting and whitespace checks passed. The local run used Node on Windows, not CI's Bun/Linux scheduling.One bounded diagnostic ran only that failed alias-close case on the final fixed
f39b480integration inputs; it also timed out after 120 seconds (one failed, 14 explicitly filtered cases). This is a different base from the first local group, not an identical-source replay. It does not establish a preceding-file cause, a Windows-only cause, or a repaired failure. The precise blocked await remains unknown. Both failed local receipts and the wrapper's conservative retained-namespace warnings remain recorded; no further replay or production workaround was added.The separate ratchet job failed on positive test-line growth. The first fixed CI-snapshot integration measured 6,286,460 total lines and passed its explicit zero-slack budget check. After resolving the subsequent upstream scalar conflict on the final fixed
f39b480snapshot, the native checker measured 6,286,640 total lines with a +694 PR delta. The final deliberate ceiling change is exactly 6,285,587 to 6,286,640, with zero slack: 694 retained regression lines plus 359 lines already beyond the ceiling in the comparison tree. That split is arithmetic, not an independent failing run of main. The documented owner permits manual increases with a PR justification. No guard was disabled or required coverage deleted; the native checker passed after the edit.The new fixture received an independent full-context P0–P3 agent review, and the mechanical integration/budget change received a separate independent assessment. Neither found an actionable issue; neither is a CLI/helper pass. Current-head hosted CI remains separate from the previous failed run and these local receipts.
Passing Local Evidence
create_goal -> sessions_spawn -> sessions_yield -> committed requester final -> Goal nudge -> complete, plus a non-yield final control: delegated parent/child requests6/1, direct4/0, exactly one continuation in each, no provider errors.mainreceives the real siblingsessions_createdenial, creates no sibling session, and completes one Goal continuation. After a separate member's role is revoked throughusers.setRole, the held provider socket is actually cancelled; no subsequent provider requests, sibling session, Goal completion, or normal post-revocation assistant chat delta/final content is observed. This is a fixed-provider Gateway regression, not a real-model authority proof.de7fed4, Goal owner/tool suites: 73 passed (66 + 7). Both Gateway tests passed. Affected consumers and provider-prefix tests passed across eight files; their combined test total is not asserted because one summary was truncated in the captured output.These Gateway tests use a scripted loopback Responses provider. They are not hosted-model, real-channel, restart, local Codex, or production-scale proof. Hosted CI for the repaired candidate and its CI duration are not established by these local runs.
Hosted-Model Exercise: Partial Evidence, Both Attempts Failed
Both exercises used an isolated shipped
dist/index.jsGateway process, the built-in OpenClaw agent runtime, actual public native CLI/WebSocket RPC with the current client version, and Alibaba Bailianqwen3.8-flash. All task content was synthetic. This was not a browser/Control UI exercise, and no production service or operator state was used.The tested source was the tracked-clean preceding candidate
de7fed4b39fdfdd5f0b0c736d914533fbbed5e42, not the current CI-follow-up head. Native preparation reportedbuild:falseandruntime:false, and the effective build/runtime input fingerprints matched that source. The unchanged producer stamps still record precommit producer HEAD70159c5dc95809b55cb60713a558d871ef08ecadwithinputsClean:false. This is supported source-equivalent artifact reuse for that source, not a claim that the artifacts were freshly built at either repaired commit. No new model call accompanied the CI follow-up.create_goal,sessions_spawn, one child request,sessions_yield, requester return, and later requests containing the automatic Goal nudge, includingupdate_goal. The final harness assertion failed. That original capture omitted the exact assertion phase, last public Goal row, and final receipt, and its isolated state was cleaned. Two response-time ordinal labels also overlap. Consequently, neither completed Goal state nor successful final delivery can be inferred, and this trace is not a passing automatic-continuation proof.sessions.messages.subscribeobserver and named assertion diagnostics, the public Goal wascomplete, its continuation count was 0, and the final marker was caller-visible. One child request and a real yield occurred, but no automatic Goal nudge occurred. The model instead completed the Goal during the requester child-return, contrary to the synthetic task's instruction to leave an unfinished interim phase. It therefore did not exercise the required automatic-continuation case. This is not attributed to a production defect. The client, Gateway, remote I/O, and accounting writes were joined; only stopped synthetic state was retained privately before normal cleanup.There were 13 physical hosted-model requests, all HTTP 200 with usage reported: 96,997 input tokens and 1,164 output tokens. No further model attempt was made. Private credential configuration and account/budget accounting are not part of this public evidence.
The failed artifacts and accounting are retained locally; no public hosted-model proof artifact is claimed. The unmet proof requirements above remain explicit.
Reproduction, scope, and historical evidence
Original tested source base:
ab68862753db1c083bf4bac921d642b4e194631b; Node 24.22.1 on Windows 11. The core Goal tool/continuation files remained byte-identical in the later upstream snapshot originally checked, and both callers still required a pre-existing Goal. That was a source check, not runtime proof of that later snapshot.The earlier
70159c5dc95809b55cb60713a558d871ef08ecadvalidation recorded 74 owner/tool tests, 53 consumer/provider-prefix tests across seven files, and both import-cycle checks passing. Those are historical results, not substituted for the current 73-test owner/tool result or a new import-cycle run.Current focused reproduction commands:
In the repaired-candidate run, the original Gateway test body took 26.687s and the authority test body 84.342s; the combined Vitest run took 268.39s. Its cold wrapper took 1,226.24s, including a successful 826.6s runtime build. These are local measurements, not CI timings. Historically, the original Gateway test alone took 31.110s of test time / 55.64s Vitest wall time, with an initial cold 57.085s / 143.89s run including compilation/import.
The original Gateway test reuses one Gateway for delegated and direct routes because helper mocks cannot prove the actual tool run ID, async scope, persisted child handoff, and subsequent queue drain. The separate authority regression likewise reuses one Gateway for its current-role and revoked-role scenarios; it does not add a production authority seam.
The context-read consumer originally used an unregistered operation double to isolate a Goal-less persist-before-native-queue race. Its Goal wrapper is explicitly isolated; its original assertions remain unchanged. Goal/controller composition stays covered by the Goal owner suite and actual Gateway regressions. No production lifecycle check was relaxed to accommodate that double.
The change reuses the existing owner and removes the initial-Goal-only selection, rather than adding another scheduler or stored return state. Against the current fixed main snapshot, the production delta remains +72/-22 lines; tests are +699/-5, including the original 225-line Gateway composition, the added 370-line authority regression, and the existing consumer fixture repair. The explicit test-budget adjustment is one additional configuration line.