Skip to content

fix(gateway): recover embedded channel runs in chat startup projection - #123189

Merged
obviyus merged 2 commits into
openclaw:mainfrom
SunnyShu0925:fix/control-ui-run-recovery-121756
Aug 27, 2026
Merged

obviyus merged 2 commits into
openclaw:mainfrom
SunnyShu0925:fix/control-ui-run-recovery-121756

Conversation

@SunnyShu0925

@SunnyShu0925 SunnyShu0925 commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Related to #121756

What Problem This Solves

A run started from Telegram can remain active while Control UI receives only hasActiveRun: true. It receives no exact run identity or recovery snapshot. After reload, the timer restarts, recent activity is incomplete, and Stop cannot target the recorded embedded-run owner.

Why This Change Was Made

The embedded-run registry owns the live run identity. Gateway history only projected browser-started chat controllers. The submitted patch added a second replay buffer inside the embedded registry. This revision removes that duplicate owner.

Gateway now combines the embedded registry's exact identity and core start time with the existing bounded chat progress snapshot. Embedded tool replay uses the same recorder in summary mode. It keeps only phase, tool name, and call ID. It drops arguments, output, diffs, partial output, and review payloads.

Control UI marks this recovery snapshot as session-owned. Stop sends the exact run ID through sessions.abort. The embedded owner is revalidated at use time, so a stale Stop cannot cancel replacement work.

User Impact

After a reload, Control UI keeps the active Telegram run's original timer and recent activity. Stop interrupts that exact run. No configuration changes are required.

Evidence

The same Telegram Test Server direct-message scenario ran against current main and the final production patch.

Check Current main Final patch
Gateway history hasActiveRun: true; no activeRunIds; no inFlightRun Exact run identity, original start time, sessionAbortable: true, and three bounded activity events
Reload timer Reset to 1 second while the run was already about two minutes old Kept the same start value before and after reload; visible time advanced from 1m to 1m 1s
Activity privacy No embedded recovery payload Tool events contained only name, phase, and toolCallId
Stop No recoverable exact identity Control UI Stop aborted the live provider request; history then reported no active run
Telegram/provider Delivery reached the model The real Test Server user sent the turn; two matching provider requests ran; the progress message was deleted after Stop

The green run used dcad49f482f8. The current head 26e7738ed334 differs only by removal of invalid test-fixture fields. Production code is byte-identical.

Focused checks:

  • Gateway recovery and abort: 151 tests passed.
  • Embedded registry: 15 tests passed.
  • Codex and Copilot start-time propagation: 18 tests passed.
  • Control UI lifecycle: 40 tests passed.
  • Control UI browser recovery: 5 tests passed.
  • Embedded privacy regression: 118 Gateway tests passed, including secret-bearing tool fields excluded from both chat.history and chat.startup.

Sanitized Control UI proof

After reload, the original timer and activity remain:

Control UI after reload

After Stop, the run is no longer active:

Control UI after Stop

AI Assistance

  • AI-assisted: Yes
  • Tools: Codex
  • Confirmed understanding: Yes

@clawsweeper

clawsweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: S labels Aug 13, 2026
@SunnyShu0925
SunnyShu0925 force-pushed the fix/control-ui-run-recovery-121756 branch from 36cf24d to 16a8d36 Compare August 13, 2026 12:56
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 10:58 AM ET / 14:58 UTC.

ClawSweeper review

What this changes

The PR lets Control UI recover an active channel-originated embedded run’s identity, original timer, bounded progress, and safe Stop route after reload.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This PR remains necessary: current main marks embedded runs active but cannot project their identity or recovery snapshot into chat startup/history. The branch adds that missing owner-boundary bridge without a concrete correctness defect found in review; merge still needs exact-head CI and live review-state refresh.

Priority: P1
Reviewed head: 26e7738ed33426c77133d1cf7af1c77253bb724c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has strong scenario evidence and targeted owner-boundary coverage; exact-head CI and live review state remain the material merge checks.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR supplies after-fix Telegram Test Server evidence plus sanitized Control UI reload and Stop screenshots, with focused source and UI coverage for the recovered path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR supplies after-fix Telegram Test Server evidence plus sanitized Control UI reload and Stop screenshots, with focused source and UI coverage for the recovered path.
Evidence reviewed 5 items Current-main gap: Current main treats an embedded run as active while omitting its exact IDs, then asks only chat-abort controllers for an in-flight recovery snapshot; an embedded-only run therefore has no recoverable snapshot.
Owner-boundary repair: The branch projects the active embedded owner from the registry and rechecks both the session slot and run-id index immediately before cancellation, preventing a stale recovered Stop from reaching replacement work.
Boundary coverage: Tests cover history/startup projection with redacted embedded progress, cross-session rejection, stale replacement-owner rejection, and the UI’s session-owned Stop route.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/pages/chat/run-lifecycle.test.ts

Result: PASS (completed)

[test] starting test/vitest/vitest.ui.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-123189-zETisc/target

 ✓  ui  ui/src/pages/chat/run-lifecycle.test.ts (40 tests) 34ms

 Test Files  1 passed (1)
      Tests  40 passed (40)
   Start at  14:59:00
   Duration  1.96s (transform 1.41s, setup 109ms, import 1.42s, tests 34ms, environment 0ms)

[test] passed 1 Vitest shard in 2.48s

Assertions:

  • NOT OBSERVED expect_output: routes recovered embedded Stop through sessions.abort with its run id — command exited successfully; expected output was not observed in the captured pane

How this fits together

Channel turns are owned by the embedded-run registry, while Control UI reloads obtain session state from Gateway chat history/startup. This change joins the registry’s live owner to the existing bounded chat projection so the UI can resume and cancel the correct run.

flowchart LR
  A[Channel turn] --> B[Embedded run registry]
  B --> C[Gateway recovery projection]
  D[Bounded chat progress] --> C
  C --> E[Control UI reload]
  E --> F[Timer and activity restored]
  E --> G[Exact safe Stop]
Loading

Before merge

  • Resolve merge risk (P1) - This bug-fix PR adds production +343/-72 lines (net +271); the session-state merge needs exact-head integration checks before merge.
  • Resolve merge risk (P1) - GitHub API DNS was unavailable during review, so live mergeability, remaining maintainer discussion, and the in-progress check results need a fresh server-side read before landing.
  • Complete next step (P2) - No mechanical repair was identified; complete normal exact-head CI and maintainer review rather than opening a replacement repair job.
Agent review details

Security

None.

PR surface

Source +271, Tests +372. Total +643 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 18 343 72 +271
Tests 7 373 1 +372
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 25 716 73 +643

Review metrics

Metric Value Why it matters
Production versus test LOC production +343/-72 (net +271); tests +373/-1 (net +372) The added code spans registry ownership, Gateway projection, cancellation, two runtimes, and Control UI; the focused tests cover the new cross-boundary behavior.

Stored data model

Persistent data-model change detected: unknown-data-model-change: src/gateway/server-methods/sessions-abort.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #121756
Summary: This PR is a candidate fix for the open canonical report’s embedded-run recovery and Stop behavior.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Verify the merged recovery boundary (recommended)
    Run the exact-head Gateway and Control UI recovery/Stop checks, including replacement-owner and cross-session rejection cases, before merge.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Run exact-head embedded-run recovery and cancellation checks, including stale replacement-owner and cross-session rejection coverage.

Technical review

Best possible solution:

Keep one registry-owned recovery projection, preserve summary-only progress redaction and complete-controller semantics for activeRunIds, and land only after exact-head recovery and cancellation checks pass.

Do we have a high-confidence way to reproduce the issue?

Yes. The linked report supplies a precise active Telegram embedded-run reload scenario, the PR records a before/after Telegram Test Server run, and current-main source independently shows the controller-only projection gap.

Is this the best way to solve the issue?

Yes. Reusing the embedded registry as the authoritative owner and the existing bounded chat projection avoids a duplicate replay buffer while retaining exact-run cancellation fencing.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 671e41a8773b.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR supplies after-fix Telegram Test Server evidence plus sanitized Control UI reload and Stop screenshots, with focused source and UI coverage for the recovered path.

Label justifications:

  • P1: Reloading an active channel run currently loses its recoverable identity, progress, timer, and precise Stop behavior.
  • merge-risk: 🚨 session-state: The PR changes how active run identity and lifecycle state are recovered and cancelled across the registry, Gateway, and Control UI.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR supplies after-fix Telegram Test Server evidence plus sanitized Control UI reload and Stop screenshots, with focused source and UI coverage for the recovered path.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies after-fix Telegram Test Server evidence plus sanitized Control UI reload and Stop screenshots, with focused source and UI coverage for the recovered path.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR supplies after-fix Telegram Test Server evidence plus sanitized Control UI reload and Stop screenshots, with focused source and UI coverage for the recovered path.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Authored the recent agent-scoped in-flight adoption repair on the same Gateway/UI recovery surface. (role: recent adjacent recovery contributor; confidence: high; commits: 508b35d9278c; files: src/gateway/chat-abort.ts, src/gateway/server-methods/chat-history-handler.ts)
  • Patrick Erichsen: Authored the prior navigation/reconnect active-turn recovery implementation that this PR extends to embedded runs. (role: active-turn recovery feature contributor; confidence: high; commits: 5bb27ecd46bc; files: src/gateway/chat-abort.ts, ui/src/pages/chat/chat-history.ts)
  • Jason (Json): Authored the earlier active-run timing preservation work relevant to forwarding the authoritative embedded start timestamp. (role: timer recovery contributor; confidence: medium; commits: 3645e369a86f; files: ui/src/pages/chat/chat-history.ts, ui/src/pages/chat/run-lifecycle.ts)
  • scotthuang: Authored the earlier selected-channel-session Stop behavior that shares the cancellation boundary. (role: channel-session Stop contributor; confidence: medium; commits: 2900026b333d; files: src/gateway/server-methods/sessions-abort.ts, ui/src/pages/chat/run-lifecycle.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the in-progress exact-head checks and refresh GitHub mergeability/review state before landing.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (41 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-23T01:28:59.830Z sha ab4e758ac9f77191835177ad9edfc3c55dfcc2ff :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-23T01:44:58.688Z sha ab4e758ac9f77191835177ad9edfc3c55dfcc2ff :: needs real behavior proof before merge. :: [P1] Preserve plan events in embedded replay
  • reviewed 2026-08-23T02:13:47.936Z sha e3a578337f78a5f9062e42b1c7b7cade9dcf5383 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-23T02:54:50.264Z sha e3a578337f78a5f9062e42b1c7b7cade9dcf5383 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-23T14:13:20.324Z sha e3a578337f78a5f9062e42b1c7b7cade9dcf5383 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T13:04:28.744Z sha fe0e9a0e9fa066a34c571067dce6596944bfe04b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T13:32:58.067Z sha 7b1be90aae6a1b46cf36d51ecaa4ae4b3eb2fc8e :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T14:29:49.792Z sha dcad49f482f866c7f283ebb7fdc28867851639cb :: needs maintainer review before merge. :: none

@SunnyShu0925
SunnyShu0925 force-pushed the fix/control-ui-run-recovery-121756 branch 3 times, most recently from 772d747 to 6e059e2 Compare August 13, 2026 22:48
@clawsweeper

clawsweeper Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 14, 2026
@SunnyShu0925
SunnyShu0925 force-pushed the fix/control-ui-run-recovery-121756 branch from da68010 to 8a35edd Compare August 14, 2026 10:15
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@SunnyShu0925
SunnyShu0925 force-pushed the fix/control-ui-run-recovery-121756 branch 2 times, most recently from 813319c to 7e5115d Compare August 14, 2026 11:23
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 18, 2026
@SunnyShu0925
SunnyShu0925 force-pushed the fix/control-ui-run-recovery-121756 branch from d163391 to 0500ecd Compare August 18, 2026 07:09
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Aug 18, 2026
@SunnyShu0925
SunnyShu0925 force-pushed the fix/control-ui-run-recovery-121756 branch from 0500ecd to f049ab7 Compare August 18, 2026 08:23
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@SunnyShu0925

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@obviyus

obviyus commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks @SunnyShu0925!

Proof: A real Telegram Test Server direct message started a long embedded run. On current main, Control UI reload showed active work without a recoverable run identity and reset the timer. On the final production patch, reload kept the original start time and bounded tool activity, and Stop ended that exact provider request. Exact-head openclaw/ci-gate passed on rerun attempt 2. Local ClawSweeper passed 26e7738ed334 with no findings, no security concerns, no maintainer decision, and no rank-up moves.

  • Bug: A channel-originated embedded run stayed active, but Control UI could not recover its identity, elapsed time, recent activity, or a working Stop action after reload.
  • Root-cause fix: Gateway history now projects the embedded-run registry's authoritative identity through the existing bounded progress recorder. sessions.abort revalidates that same owner before stopping the exact run.

Example

Before After
Reload shows a new timer and generic active state; Stop has no exact run target. Reload keeps the original timer and safe activity summary; Stop ends the exact active run.

Checks

  • node scripts/run-vitest.mjs src/gateway/server.chat.gateway-server-chat-b.test.ts src/gateway/server-methods/sessions.abort-agent-scope.test.ts
  • node scripts/run-vitest.mjs src/agents/embedded-agent-runner/runs.lifecycle.test.ts
  • node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt.steering.test.ts extensions/copilot/src/attempt-active-run.test.ts
  • node scripts/run-vitest.mjs ui/src/pages/chat/run-lifecycle.test.ts
  • node scripts/run-vitest.mjs src/gateway/server-methods/models-list-result.cli-runtime-availability.test.ts --reporter=verbose

@SunnyShu0925

Copy link
Copy Markdown
Contributor Author

@obviyus Thanks for your optimization and merge — it's been a real pleasure working with you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui extensions: codex extensions: copilot gateway Gateway runtime merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants