Skip to content

fix(app): hide the child checklist when a stopped parent receives a follow-up - #4786

Merged
yomgui merged 12 commits into
devfrom
e2e/child-checklist-after-stop
Sep 11, 2026
Merged

yomgui merged 12 commits into
devfrom
e2e/child-checklist-after-stop

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member

Root cause

parent-child-permission-approval test 4 fails at spec line 354 (notSee("Child checklist")) after Stop + follow-up, identically on the dev baseline and on #4723's run; unowned in the 2026-09-09 E2E triage (cluster: parent-child-permission-approval test 4). The claim was added in #4649 without runtime proof.

OpenCode v1 executes tools through EffectBridge.run.promise (session/tools.ts), i.e. on a detached fiber. Aborting a session interrupts the prompt loop and marks the tool part error: Tool execution aborted, but the question tool's Question.ask keeps waiting: its request stays in GET /question until it is replied to or rejected, and no question.rejected event is emitted. Reproduced against the local engine (opencode 1.18.25, same code path as the pinned 1.18.18) with the eval mock agent: after POST /session/:id/abort, /question still listed the request 5 s later while the session was idle; POST /question/:id/reject then removed it, kept the session idle, and caused no new agent request.

So the parent faithfully kept showing the stopped child's pending question (and its "Child checklist"/"Child outline" buttons). This is a product gap, not intended retention: the child's tool call is already aborted, nothing can consume an answer, and a reload would resurrect the prompt from the engine list. The spec's claim stands unchanged.

What changed

  • apps/app/src/app/lib/opencode-interruption.ts: after stopForegroundTree confirms every stopped session idle, list pending questions and reject the ones owned by the stopped tree (root + interrupted descendants). Other roots are never touched. Best-effort: a failed withdrawal does not fail Stop (the tree is already stopped). Works through the shared Client on both engines (question.list / question.reject; the v2 adapter maps reject to form cancel).
  • apps/app/tests/opencode-session-native.test.ts: the tree-stop test now serves a /question list with a stopped-tree question and an unrelated root's question, and asserts only the stopped one is rejected, after idle confirmation.

An earlier attempt (re-reading pending questions on terminal edges in session-sync.ts, 9e709825e) was proven insufficient on Daytona at that sha (same failure at line 354, because the engine list still contains the orphan) and is reverted in ed89128d4.

This branch also merges origin/e2e/delegated-task-shimmer (#4723) and origin/e2e/fresh-session-send-gate (#4757) unchanged, only so test 4 is reachable; their files are not modified here.

Proof

pnpm evals:e2e parent-child-permission-approval --daytona with OPENWORK_EVAL_REF=783fd41fa34d3d4aab0a1dfb412df2c80d15b7c3 (source verified in-sandbox), placement line:

{"command":"evals:e2e","lane":"e2e","daytona":true,"placement":"daytona","engine":"legacy","surface":"legacy","case":null,"vision":"defer","files":["parent-child-permission-approval"],"passed":2,"failed":2,"skipped":0,"skips":[],"consented":["OPENWORK_EVAL_E2E_TESTS"],"verdict":"failed"}
Test Result at 783fd41fa
4 — a parent answers and stops real child questions, then finishes fresh work without settling an unrelated root question passed (293 s); all 7 steps green, including notSee(Child checklist) (line 354) and eventually(interruption removes only the stopped child's question)
1 — switching and creating threads hydrate permissions timed out in world provisioning (no assertion reached) in this run; passed in the three earlier runs on this branch (73b1d9397, 9e709825e, 783fd41fa first run)
2 — retry recovery and stopping a permission failed at line 137 (see("printf OTHER_PERMISSION_WITNESS")) in every run — #4757's cluster, unchanged by this PR
3 — a parent task surfaces and resolves its child permission passed

Baseline repro on the merged branch before the fix (73b1d9397): test 4 failed at line 354 with Target remained visible, tests 1 and 3 passed.

A first run at 783fd41fa never reached Stop: a single notSee CDP call after user.reload() stalled for 938 s (normally 3 s) and the 20 min test timeout fired; re-run per the lane's known instability.

Unit: bun test --isolate tests/opencode-session-native.test.ts tests/queued-drain-admission-wedge.test.ts → 41 pass, 0 fail; pnpm --filter @openwork/app typecheck clean.

Overall verdict for this spec file: Incomplete (test 4 Passed; tests 1/2 red for reasons outside this PR, see above). All Daytona sandboxes from these runs were deleted.

Noticed, not touched

  • The same engine behaviour applies to permissions: Permission.ask also stays pending in /permission after abort in v1.18.x. Test 2's Stop step ("native interruption cleanup removes the pending permission", line 150) therefore cannot pass on v1 without an app-side withdrawal too — but its prose says "without a permission reply", so the fix(app): keep a brand-new session sendable while its first snapshot loads #4757 owner should decide (reject-on-Stop vs. re-expressing the claim).
  • Test 2 currently fails earlier, at line 137: in the on-screen dump the bash step ran without asking (Ran command … Permission work finished.), i.e. the permission: { bash: "ask" } policy did not take effect in the "other" session — different from the triage's line-138 failure.
  • Test 1 timed out once in provisioning (600 s) in a run where Daytona was slow; three other runs passed.

The eval.task_activity.seed hook rendered an in-flight child under a parent
whose thread status stayed "ready": it only marked the activity store busy.
Since #4635 MessageList reads that as a stopped parent and the unobserved
child shows "Waiting for task result" instead of the Working shimmer, so
task-activity-shimmer and parent-child-permission-approval lost their
[data-subagent-activity="shimmer"] row. A delegating parent is mid-run;
mark the eval thread streaming like the chat-loading seed already does.
…immediately

A freshly created session had no cached snapshot, so deriveSessionRenderModel
reported "switching" while the first snapshot round trip ran and the composer
disabled Run task. On Daytona that window is ~0.9 s and a click or Enter inside
it was silently dropped with the draft intact. Seed the snapshot cache from the
create response (stale, so the real fetch still runs as a background refresh).
…ad of wedging

A prompt_async answered with 5xx/408 is an uncertain admission (#4635), but
the hold it created could never end: the acceptance check treated absence as
no evidence, Stop refused while the admission was unknown, and the failure body
was dropped, so the person saw a paused composer with no explanation.

- Keep the settled response body on PromptAdmissionUnknownError and show it as
  the session error card right away; the hold still prevents any resend.
- readPromptAdmission: after the exact-message GET misses, list the idle
  conversation; when native lists it without the message the POST is settled
  and did not admit, so the drain receives admission_rejected and halts like
  any definite failure (explicit retry only, never an automatic resend).
- On release the pending row is removed and the submitted composer is kept as
  an unsent message to restore; on confirmed acceptance the stale failure card
  is cleared.
Lexical keeps one empty paragraph in an empty editor, which innerText reports
as "\n". readComposerState now drops that trailing line break so draftText
matches what the person sees; user.see("composer", { text }) already trimmed.
…ssion button

The sidebar button was renamed from "New task" to "New session" in #4491
(Sep 5) and the "new" scenario added in #4631 (Sep 8) still targeted the old
label, so it could never find the button. Same user action, current label.
…d 'origin/e2e/fresh-session-send-gate' into e2e/child-checklist-after-stop
… edge

An interrupted question tool leaves the engine's pending list through its
finalizer without a question.rejected event, so Stop on a delegated child
left its question (and option buttons) in the parent view. Reconcile
questions alongside permissions on terminal edges, for both engines.
OpenCode v1 runs tools on detached fibers: aborting a session marks the
question tool part as aborted but leaves its request in GET /question, so a
parent that stopped a delegated child kept showing the child's question and
its option buttons. After Stop confirms the tree idle, reject the pending
questions owned by the stopped sessions; other roots are left untouched.
@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 10:37pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 10:37pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 10:37pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 10:37pm UTC

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (149250 ms), confidentiality-review (84476 ms), spec-provenance-review (113965 ms), desktop-den-sync-review (178850 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 2
  • Distinct heads in retained window: 2
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 2/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 10, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (783fd41fa34d3d4aab0a1dfb412df2c80d15b7c3). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit 8763acc6dabe494501398da76c327b21046beec7 · selected evidence

Open review report

yomgui added a commit that referenced this pull request Sep 10, 2026
…after Stop

OpenCode v1 runs tools on detached fibers: aborting a session marks the tool
part as aborted but leaves its Permission.ask pending in /permission, exactly
as #4786 found for questions. The stopped tree would keep showing Allow once /
Deny in every pane and after reload although nothing can consume the answer.

After stopForegroundTree confirms every stopped session idle, also list pending
permissions and reject the ones owned by the stopped tree; other roots are
never touched and each withdrawal kind is best-effort on its own.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Deploying openwork with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8763acc
Status: ✅  Deploy successful!
Preview URL: https://e26bcc6d.openwork.pages.dev
Branch Preview URL: https://e2e-child-checklist-after-st.openwork.pages.dev

View logs

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (8763acc6dabe494501398da76c327b21046beec7). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Resync against origin/dev 0b219dc4e (merge commits, no rebase)

Two merge commits, in the prescribed order:

  1. f489b4542 — Merge origin/e2e/fresh-session-send-gate into e2e/child-checklist-after-stop (the updated fix(app): keep a brand-new session sendable while its first snapshot loads #4757 head 4a2f43213, which already carries origin/dev at 9a60a4b59).
  2. 8763acc6d — Merge origin/dev into e2e/child-checklist-after-stop (auto-merged, no conflicts). Both signed G.

Premise re-check (Jalil #4837 7f8008d58, Ben #4812 cbf327cd4). #4837 adds submitImmediateSessionTurn / foregroundDelegations so an immediate follow-up interrupts foreground delegation before admission; #4812 fixes delegated child identity and activity timing. Neither withdraws the stopped tree's pending question requests — dev has no question.reject call in apps/app/src (only the v2 adapter's event mapping and session-sync's consumer of question.rejected). The engine still leaves the aborted child's Question.ask pending in GET /question, so the parent keeps rendering the "Child checklist"/"Child outline" prompt after Stop. Still needed; complementary to #4837 (this PR acts after stopForegroundTree confirms idle, #4837 decides when to stop).

Conflict (from merge 1) — apps/app/tests/opencode-session-native.test.ts, the tree-stop test's request allow-list: this branch allows ${baseUrl}/question… (the withdrawal calls), dev allows ${baseUrl}/path?… (#4825's workspace-directory ownership check). Kept both (/session/ || /question || /path?). session-surface.tsx had no conflict once the updated #4757 was in (its import line already carried submitImmediateSessionTurn alongside promptAdmissionFailure/readPromptAdmission).

Proof at 8763acc6d (OPENWORK_EVAL_REF pinned; sandbox log HEAD is now at 8763acc6):

OPENWORK_EVAL_REF=8763acc6dabe494501398da76c327b21046beec7 pnpm evals:e2e parent-child-permission-approval --daytona

{"placement":"daytona","engine":"legacy","files":["parent-child-permission-approval"],"passed":3,"failed":1,"skipped":0,"verdict":"failed"}

Test Result at 8763acc6d (with #4837 + #4812 present)
4 — a parent answers and stops real child questions, then finishes fresh work without settling an unrelated root question passed (328 s). All 7 steps green: an unrelated root waits for its own answer, the parent displays only its delegated child's question, reloading the parent restores the same unanswered requests, answering in the parent resumes the original child and then the parent, the parent waits on another foreground child while the unrelated question stays pending, Stop immediately followed by fresh work interrupts the child and completes only the new turn once (the #4837 path + this PR's withdrawal, incl. notSee("Child checklist")), the unrelated root remains answerable without resuming the stopped child or duplicating the follow-up.
1 — switching and creating threads hydrate permissions passed
3 — a parent task surfaces and resolves its child permission passed
2 — retry recovery and stopping a permission failed at spec line 137, step two conversations own separate real approvals: Timed out after 45000ms seeing text=printf OTHER_PERMISSION_WITNESS — byte-identical to the failure recorded in this PR's body before the resync ("#4757's cluster, unchanged by this PR"). Not attributable to #4837: same signature before #4837 existed on this branch.

Verdict for this PR's claim: Passed on the merged head. File-level: Incomplete (test 2, #4757's cluster).

Delegated-task journey (task-activity-shimmer, ACT-01) at 8763acc6d — OPENWORK_EVAL_REF=8763acc6d… pnpm evals:e2e task-activity-shimmer --daytona → 1 failed, died in provisioning, no assertion reached:

launch remote app-web runtime task-activity-web-25580-64b13465 failed with exit 1:
Error: EACCES: permission denied, mkdir '/private'   (at /tmp/task-activity-web-…-launch.mjs:6)

Root cause is in the world, not the product: evals/worlds/task-activity-web.ts (#4812) does realpath(seed.tmpPath("task-activity-web")) on the host and passes that as workspacePath to seed.appWeb; on a macOS host /tmp/… realpaths to /private/tmp/…, and the Linux sandbox's launch module then mkdirs that host path. The registered case's own example is --local. Deterministic, so I did not burn a second sandbox on it. Attribute to #4812's world (harness portability), not to #4837 and not to this PR; a Daytona verdict for ACT-01 from a macOS host needs that world to compute the workspace path the way worlds/chat.ts does for remote surfaces. Not run locally from inside this session (would compete with the hosting app's engine); happy to run pnpm evals:e2e task-activity-shimmer --local --case ACT-01 on request.

Also at 8763acc6d: bun test --isolate tests/opencode-session-native.test.ts tests/queued-drain-admission-wedge.test.ts 56 pass / 0 fail; pnpm --filter @openwork/app typecheck exit 0; git diff --check origin/dev...HEAD clean. All 7 sandboxes from both runs deleted (verified by name).

Teammate PRs compared: #4837, #4812 (and #4825 for the /path? allow-list line). Still stacked on #4723 and #4757 (both open); once they land this PR reduces to opencode-interruption.ts + the test hunk.

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

#4747 revert check (#4870 on dev 858414c41): this branch does not contain 561b5c03a (git merge-base --is-ancestor 561b5c03a… HEAD → false; its merged ancestors do not either) and git diff origin/dev...HEAD -- apps/app/src/react-app/shell/desktop-runtime-boot.ts is empty. No in-branch revert needed.

@yomgui
yomgui merged commit a7f0a80 into dev Sep 11, 2026
29 checks passed
yomgui added a commit that referenced this pull request Sep 11, 2026
…ed permission requests after Stop (#4798)

* fix(app): seed the delegated-task eval with a running parent thread

The eval.task_activity.seed hook rendered an in-flight child under a parent
whose thread status stayed "ready": it only marked the activity store busy.
Since #4635 MessageList reads that as a stopped parent and the unobserved
child shows "Waiting for task result" instead of the Working shimmer, so
task-activity-shimmer and parent-child-permission-approval lost their
[data-subagent-activity="shimmer"] row. A delegating parent is mid-run;
mark the eval thread streaming like the chat-loading seed already does.

* fix(app): seed a created session's snapshot so its composer can send immediately

A freshly created session had no cached snapshot, so deriveSessionRenderModel
reported "switching" while the first snapshot round trip ran and the composer
disabled Run task. On Daytona that window is ~0.9 s and a click or Enter inside
it was silently dropped with the draft intact. Seed the snapshot cache from the
create response (stale, so the real fetch still runs as a background refresh).

* fix(app): let a send that settled with a server failure recover instead of wedging

A prompt_async answered with 5xx/408 is an uncertain admission (#4635), but
the hold it created could never end: the acceptance check treated absence as
no evidence, Stop refused while the admission was unknown, and the failure body
was dropped, so the person saw a paused composer with no explanation.

- Keep the settled response body on PromptAdmissionUnknownError and show it as
  the session error card right away; the hold still prevents any resend.
- readPromptAdmission: after the exact-message GET misses, list the idle
  conversation; when native lists it without the message the POST is settled
  and did not admit, so the drain receives admission_rejected and halts like
  any definite failure (explicit retry only, never an automatic resend).
- On release the pending row is removed and the submitted composer is kept as
  an unsent message to restore; on confirmed acceptance the stale failure card
  is cleared.

* test(evals): read an empty Lexical composer as an empty draft

Lexical keeps one empty paragraph in an empty editor, which innerText reports
as "\n". readComposerState now drops that trailing line break so draftText
matches what the person sees; user.see("composer", { text }) already trimmed.

* test(evals): open the fresh conversation through the sidebar's New session button

The sidebar button was renamed from "New task" to "New session" in #4491
(Sep 5) and the "new" scenario added in #4631 (Sep 8) still targeted the old
label, so it could never find the button. Same user action, current label.

* test(evals): create the empty-session workspace at its declared tmp path

The emptySession world declared /tmp/openwork-empty-session-<ts> but
seed.workspace() adopted the existing first-launch default workspace
instead ("OpenWork Chat" under the dev profile home). On Daytona that
profile lives inside the repo checkout, so the engine merged
/workspace/.opencode/opencode.json ("permission": "allow") over the
workspace's own catch-all and composer-run-mode never saw the workspace
MCP rule take effect.

* test(evals): name the server error when a run-mode read is not 200

* fix(app): reuse the running OpenWork server when the selected workspace is server-owned

Workspaces created from the app live only in the server registry, so a
renderer reload reaches startServerWithoutDesktopWorkspace and restarted
the embedded server (and its engine) although it was healthy and already
serving that workspace. Reuse it when it is ready with the preferred
remote-access mode; only restart when nothing usable is running.

* fix(app): re-read pending questions when a session reaches a terminal edge

An interrupted question tool leaves the engine's pending list through its
finalizer without a question.rejected event, so Stop on a delegated child
left its question (and option buttons) in the parent view. Reconcile
questions alongside permissions on terminal edges, for both engines.

* Revert "fix(app): re-read pending questions when a session reaches a terminal edge"

This reverts commit 9e70982.

* fix(app): withdraw the stopped tree's unanswered questions after Stop

OpenCode v1 runs tools on detached fibers: aborting a session marks the
question tool part as aborted but leaves its request in GET /question, so a
parent that stopped a delegated child kept showing the child's question and
its option buttons. After Stop confirms the tree idle, reject the pending
questions owned by the stopped sessions; other roots are left untouched.

* test(evals): create the permission-stop-recovery workspace at its declared tmp path

Test 2 of parent-child-permission-approval ran bash without asking although the
world wrote permission.bash="ask" to the workspace opencode.json. The world
called seed.workspace() without create, so it adopted the first-launch default
workspace under the dev profile, which on Daytona lives inside the repo
checkout; the engine merges /workspace/.opencode/opencode.json
("permission": "allow") after the workspace file and the agent ruleset ends
as [* allow, bash ask, * allow] (last match wins; permissions/effective reported
shell allow, source engine, workspace file .../home/OpenWork Chat/opencode.jsonc).

Same trap and same remedy as #4747 for emptySession; opt-in so the other
splitPaneQuestions worlds keep their arrangement.

* fix(app): withdraw the stopped tree's unanswered permission requests after Stop

OpenCode v1 runs tools on detached fibers: aborting a session marks the tool
part as aborted but leaves its Permission.ask pending in /permission, exactly
as #4786 found for questions. The stopped tree would keep showing Allow once /
Deny in every pane and after reload although nothing can consume the answer.

After stopForegroundTree confirms every stopped session idle, also list pending
permissions and reject the ones owned by the stopped tree; other roots are
never touched and each withdrawal kind is best-effort on its own.
yomgui added a commit that referenced this pull request Sep 11, 2026
… route-commit wait in world open() (#4810)

* fix(app): seed the delegated-task eval with a running parent thread

The eval.task_activity.seed hook rendered an in-flight child under a parent
whose thread status stayed "ready": it only marked the activity store busy.
Since #4635 MessageList reads that as a stopped parent and the unobserved
child shows "Waiting for task result" instead of the Working shimmer, so
task-activity-shimmer and parent-child-permission-approval lost their
[data-subagent-activity="shimmer"] row. A delegating parent is mid-run;
mark the eval thread streaming like the chat-loading seed already does.

* fix(app): seed a created session's snapshot so its composer can send immediately

A freshly created session had no cached snapshot, so deriveSessionRenderModel
reported "switching" while the first snapshot round trip ran and the composer
disabled Run task. On Daytona that window is ~0.9 s and a click or Enter inside
it was silently dropped with the draft intact. Seed the snapshot cache from the
create response (stale, so the real fetch still runs as a background refresh).

* fix(app): let a send that settled with a server failure recover instead of wedging

A prompt_async answered with 5xx/408 is an uncertain admission (#4635), but
the hold it created could never end: the acceptance check treated absence as
no evidence, Stop refused while the admission was unknown, and the failure body
was dropped, so the person saw a paused composer with no explanation.

- Keep the settled response body on PromptAdmissionUnknownError and show it as
  the session error card right away; the hold still prevents any resend.
- readPromptAdmission: after the exact-message GET misses, list the idle
  conversation; when native lists it without the message the POST is settled
  and did not admit, so the drain receives admission_rejected and halts like
  any definite failure (explicit retry only, never an automatic resend).
- On release the pending row is removed and the submitted composer is kept as
  an unsent message to restore; on confirmed acceptance the stale failure card
  is cleared.

* test(evals): read an empty Lexical composer as an empty draft

Lexical keeps one empty paragraph in an empty editor, which innerText reports
as "\n". readComposerState now drops that trailing line break so draftText
matches what the person sees; user.see("composer", { text }) already trimmed.

* test(evals): open the fresh conversation through the sidebar's New session button

The sidebar button was renamed from "New task" to "New session" in #4491
(Sep 5) and the "new" scenario added in #4631 (Sep 8) still targeted the old
label, so it could never find the button. Same user action, current label.

* test(evals): create the empty-session workspace at its declared tmp path

The emptySession world declared /tmp/openwork-empty-session-<ts> but
seed.workspace() adopted the existing first-launch default workspace
instead ("OpenWork Chat" under the dev profile home). On Daytona that
profile lives inside the repo checkout, so the engine merged
/workspace/.opencode/opencode.json ("permission": "allow") over the
workspace's own catch-all and composer-run-mode never saw the workspace
MCP rule take effect.

* test(evals): name the server error when a run-mode read is not 200

* fix(app): reuse the running OpenWork server when the selected workspace is server-owned

Workspaces created from the app live only in the server registry, so a
renderer reload reaches startServerWithoutDesktopWorkspace and restarted
the embedded server (and its engine) although it was healthy and already
serving that workspace. Reuse it when it is ready with the preferred
remote-access mode; only restart when nothing usable is running.

* test(evals): open the saved-app verification return tab as a person's new tab

returnVerification drove the agent browser entry point (browser.openUrl, the
IPC behind browser.open_url) with no requesting conversation. Since #4434 the
task host refuses that, and it never accepted an about:blank destination.
The tab only stands in for the person's own browser so the openwork:// return
link can be navigated without OS protocol registration, so create it the way a
person opens a new tab and find its CDP target by diffing the page targets.

* fix(app): re-read pending questions when a session reaches a terminal edge

An interrupted question tool leaves the engine's pending list through its
finalizer without a question.rejected event, so Stop on a delegated child
left its question (and option buttons) in the parent view. Reconcile
questions alongside permissions on terminal edges, for both engines.

* Revert "fix(app): re-read pending questions when a session reaches a terminal edge"

This reverts commit 9e70982.

* fix(app): withdraw the stopped tree's unanswered questions after Stop

OpenCode v1 runs tools on detached fibers: aborting a session marks the
question tool part as aborted but leaves its request in GET /question, so a
parent that stopped a delegated child kept showing the child's question and
its option buttons. After Stop confirms the tree idle, reject the pending
questions owned by the stopped sessions; other roots are left untouched.

* test(evals): temporary Z2 diagnostics around dashboard delete route change

* test(evals): saved-apps world.open returns once the destination page root has rendered

* test(evals): create the permission-stop-recovery workspace at its declared tmp path

Test 2 of parent-child-permission-approval ran bash without asking although the
world wrote permission.bash="ask" to the workspace opencode.json. The world
called seed.workspace() without create, so it adopted the first-launch default
workspace under the dev profile, which on Daytona lives inside the repo
checkout; the engine merges /workspace/.opencode/opencode.json
("permission": "allow") after the workspace file and the agent ruleset ends
as [* allow, bash ask, * allow] (last match wins; permissions/effective reported
shell allow, source engine, workspace file .../home/OpenWork Chat/opencode.jsonc).

Same trap and same remedy as #4747 for emptySession; opt-in so the other
splitPaneQuestions worlds keep their arrangement.

* fix(app): withdraw the stopped tree's unanswered permission requests after Stop

OpenCode v1 runs tools on detached fibers: aborting a session marks the tool
part as aborted but leaves its Permission.ask pending in /permission, exactly
as #4786 found for questions. The stopped tree would keep showing Allow once /
Deny in every pane and after reload although nothing can consume the answer.

After stopForegroundTree confirms every stopped session idle, also list pending
permissions and reject the ones owned by the stopped tree; other roots are
never touched and each withdrawal kind is best-effort on its own.

* test(evals): remove temporary Z2 diagnostics from saved-app-creation

* test(evals): make locate() misses list every candidate of the requested role plus route and page roots

A miss used to quote only the first 8 visible buttons in DOM order, which
are always the shell rail, so every miss read as "the page has no
buttons" (#4794's diagnosis detour). The browser-side report now lists
every rendered element of the requested role (buttons/links for
role-less targets), the current route/hash, and whether the
[data-app-header] / [data-dashboard-page] roots are mounted. The Node
side caps the list at 40 and says how many the page really had.
Matching is unchanged.

* test(evals): run the serialized locate() miss callback against a fake page DOM

Proves the browser-side branch the way Chromium will execute it: the
report lists every rendered menuitem on a dashboard whose shell rail has
nine buttons, names the route and mounted page roots, and a role-less
miss lists all nine buttons instead of the first eight.

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — 8763acc6 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — 8763acc6 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — 8763acc6 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — 8763acc6 Deployed Sep 10, 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.

1 participant