Skip to content

fix(infer): cancel model and embedding requests on interrupt - #192896

Merged
obviyus merged 3 commits into
mainfrom
fix/infer-interrupt-sweep-192818
Nov 4, 2026
Merged

obviyus merged 3 commits into
mainfrom
fix/infer-interrupt-sweep-192818

Conversation

@obviyus

@obviyus obviyus commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Ctrl+C is accepted by infer model run and infer embedding create, but their execution calls omit the invocation's existing abort signal. A pending local request or Gateway RPC therefore holds cleanup until the shipped launcher escalates instead of completing the command's cancellation drain.

User Impact

Interrupted local model requests and embedding batches cancel promptly when the provider honors cancellation. Interrupted Gateway model runs disconnect the caller's RPC promptly. All three paths exit naturally with status 130 and publish no inference result after interruption. Uninterrupted commands are unchanged.

Gateway-owned generation has a separate lifetime: this patch does not cancel that server-side work when its caller disconnects. The proof observes that boundary explicitly rather than claiming upstream cancellation through the Gateway.

Why This Change Was Made

Use getAsyncWorkSignal() from the established CLI work scope at the three existing execution boundaries: local completion options, callGateway, and embedding batch options. No new cancellation owner, timeout, configuration, API, auth behavior, schema, retry guidance, or stored-state format.

This sweep includes @wangmiao0668000666's fixes from #192818 and #192846. Both fix commits were cherry-picked with contributor authorship preserved: 5aa763166e4a and 3d1a8d1d9029. The source PRs remain open for resolution after this sweep lands.

Replaced successful-call signal-presence assertions with pending-work cancellation regressions. The tests close the invocation scope, observe the execution boundary's abort listener, verify output suppression, and retain resource cleanup assertions. Existing provider selection, image/media, authorization, profile-reference, dimensions, and cleanup-failure coverage remains. Test setup is consolidated rather than allocated.

Evidence

Full real-PTY terminal capture, request-close measurements, and all 18 recorded outcomes

Built source: main 7c2ff8f775acca3e5c93c9c22b6247e37df29bae; combined candidate production 636fb5a0766739fbce2d289cfc376c9fcc6aa868. Final head 54221c9eaa45d3a022090153598118ccf03586ca changes only tests/docs afterward. Both runtime builds and all runs are secretless node:24.22.1 Docker with explicit task-owned profiles, HOME/state/config/workspace and database paths printed by the exact built CLI.

The shipped openclaw.mjs runs in a real controlling PTY (pty.fork). Writing the terminal's Ctrl+C byte delivers actual SIGINT while a faithful local Responses/embeddings HTTP request is pending. No runtime imports, monkeypatches, injected failures, fake Gateway, or real provider credentials. Gateway calls pass through a passive byte-for-byte TCP/WebSocket observer to the real built Gateway.

Two interrupted main runs and two interrupted candidate runs per path, plus one uninterrupted control per path/ref: 18 cases.

Path Main after Ctrl+C (two runs) Candidate after Ctrl+C (two runs) Candidate transport close
model run --local SIGKILL at 2055 / 2183 ms Natural exit 130 at 56 / 48 ms HTTP peer close at 2.79 / 1.79 ms
model run --gateway SIGKILL at 2158 / 2271 ms Natural exit 130 at 30 / 35 ms Caller RPC close at 1.46 / 2.07 ms
embedding create SIGKILL at 2165 / 2218 ms Natural exit 130 at 40 / 38 ms HTTP peer close at 1.44 / 1.39 ms

All six uninterrupted controls complete normally with exit 0 and their complete response/vector result. All six interrupted candidates suppress result output; local and embedding HTTP responses do not complete. Gateway upstream streams complete normally on both refs, separately recorded and correlated by unique request IDs. No harness safety kill occurred in any case.

110 focused tests pass, including real-HTTP embedding integration; all three new cancellation cases fail on main. The final image-fixture consolidation's three cases, focused test typecheck, typed lint, and formatting pass.

Whole-PR deltas: production +11/-2 (net +9; 13 gross changed lines), tests +120/-122 (net -2), docs +5. The over-cap main capability test file shrinks by 39 lines. No test allocation or baseline growth.

Merge danger

Two-way door: reverting restores the old caller wait-out behavior; no migration or persisted-state changes. Blast radius is cancellation of model-run local requests, model-run caller RPCs, and embedding batches, plus their existing cleanup/output boundaries. Gateway generation ownership, provider selection, ordinary failure handling, and uninterrupted results are unchanged.

wangmiao0668000666 and others added 3 commits November 4, 2026 21:56
infer embedding create runs a provider embedBatch without forwarding the
CLI work-scope signal, so an accepted Ctrl+C cannot cancel the in-flight
provider request and the command waits out the batch. Mirror the image,
web and TTS capability commands by handing getAsyncWorkSignal() to the
embedBatch call; runCapabilityCommand already suppresses late output for
accepted interrupts.

Precedent: #191176, #191628, #191635, #192818
@clawsweeper

clawsweeper Bot commented Nov 4, 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 docs Improvements or additions to documentation cli CLI command changes size: M labels Nov 4, 2026
@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Real PTY Ctrl+C: main twice, candidate twice, and uninterrupted controls

Exact sweep head: 54221c9eaa45d3a022090153598118ccf03586ca. Frozen main: 7c2ff8f775acca3e5c93c9c22b6247e37df29bae. Built candidate production: 636fb5a0766739fbce2d289cfc376c9fcc6aa868; the final commit changes tests/docs only. Both were runtime-built in secretless node:24.22.1 Docker and invoked through shipped openclaw.mjs, not imported command handlers.

Python stdlib pty.fork() supplies a real controlling terminal. After two normal streaming deltas (or 500 ms of the pending embedding request), the driver writes the PTY Ctrl+C byte. The kernel delivers SIGINT to the foreground process group; every interrupted record confirms a terminal and foreground group. The driver does not send a second interrupt or kill during the proof window, and its safety-kill flag is false for every case. Normal launcher behavior is retained (no OPENCLAW_NO_RESPAWN override).

Faithful local HTTP fixtures stream 40 successful Responses deltas at 250 ms intervals or return an ordinary embedding response after 10 seconds. All six uninterrupted controls complete successfully with a full response/vector and exit 0. Request IDs are unique and prior Gateway generations settle before the next case. Explicit owned profiles, HOME/state/config/workspace, config-file and database paths are captured from each exact binary before running. No real credentials, runtime monkeypatches, injected errors, fake Gateway, or live provider.

Both main repetitions for all three paths end with SIGKILL after 2.05–2.27 seconds, without a cooperative cancellation drain. All six candidate repetitions exit naturally with status 130 in 30–56 ms. Local model and embedding sockets close before response completion in 1.4–2.8 ms. Gateway caller RPC closes in 1.5–2.1 ms through a passive byte-for-byte TCP/WebSocket observer.

Gateway boundary: the provider stream behind the Gateway completes normally on both refs. This sweep cancels the caller RPC and its wait, not Gateway-owned generation. The HTTP completion counts below disclose that distinction.

Actual visible PTY output on interrupted main and candidate runs:

^CCommand interrupted by SIGINT. Waiting for cleanup before exiting.

No interrupted candidate prints a success envelope or fixture inference content. All eighteen recorded outcomes follow; times are milliseconds measured using a monotonic clock:

[
  {
    "lane": "base",
    "path": "model_local",
    "case": "control",
    "exitCode": 0,
    "signalToExitMs": null,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": false,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "model_local",
    "case": "interrupt1",
    "exitCode": -9,
    "signalToExitMs": 2054.957845,
    "httpCloseAfterSignalMs": [
      2052.883333
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "model_local",
    "case": "interrupt2",
    "exitCode": -9,
    "signalToExitMs": 2182.997834,
    "httpCloseAfterSignalMs": [
      2180.986655
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "model_gateway",
    "case": "control",
    "exitCode": 0,
    "signalToExitMs": null,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": false,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "model_gateway",
    "case": "interrupt1",
    "exitCode": -9,
    "signalToExitMs": 2157.856147,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [
      2155.567467
    ],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "model_gateway",
    "case": "interrupt2",
    "exitCode": -9,
    "signalToExitMs": 2271.223592,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [
      2269.672583
    ],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "embedding",
    "case": "control",
    "exitCode": 0,
    "signalToExitMs": null,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": false,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "embedding",
    "case": "interrupt1",
    "exitCode": -9,
    "signalToExitMs": 2165.214398,
    "httpCloseAfterSignalMs": [
      2163.520513
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "base",
    "path": "embedding",
    "case": "interrupt2",
    "exitCode": -9,
    "signalToExitMs": 2218.354829,
    "httpCloseAfterSignalMs": [
      2216.358151
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "model_local",
    "case": "control",
    "exitCode": 0,
    "signalToExitMs": null,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": false,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "model_local",
    "case": "interrupt1",
    "exitCode": 130,
    "signalToExitMs": 55.692114,
    "httpCloseAfterSignalMs": [
      2.787183
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "model_local",
    "case": "interrupt2",
    "exitCode": 130,
    "signalToExitMs": 47.564692,
    "httpCloseAfterSignalMs": [
      1.78526
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "model_gateway",
    "case": "control",
    "exitCode": 0,
    "signalToExitMs": null,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": false,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "model_gateway",
    "case": "interrupt1",
    "exitCode": 130,
    "signalToExitMs": 30.181924,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [
      1.4633
    ],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "model_gateway",
    "case": "interrupt2",
    "exitCode": 130,
    "signalToExitMs": 34.504742,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [
      2.072262
    ],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "embedding",
    "case": "control",
    "exitCode": 0,
    "signalToExitMs": null,
    "httpCloseAfterSignalMs": [],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 1,
    "resultOutputSuppressed": false,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "embedding",
    "case": "interrupt1",
    "exitCode": 130,
    "signalToExitMs": 40.024314,
    "httpCloseAfterSignalMs": [
      1.441133
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  },
  {
    "lane": "cand",
    "path": "embedding",
    "case": "interrupt2",
    "exitCode": 130,
    "signalToExitMs": 38.162262,
    "httpCloseAfterSignalMs": [
      1.392633
    ],
    "rpcCallerCloseAfterSignalMs": [],
    "requests": 1,
    "completed": 0,
    "resultOutputSuppressed": true,
    "harnessSafetyKill": false
  }
]

Focused verification: 110 capability/real-HTTP embedding tests pass; all three cancellation regressions fail on frozen main. Final three image/default-fixture cases, focused test typecheck, typed lint and formatting pass. Tests total +120/-122 (net -2), production +11/-2 (net +9), docs +5; no allocation or baseline increase. Both source fixes from @wangmiao0668000666 (#192818, #192846) retain contributor authorship.

@obviyus
obviyus marked this pull request as ready for review November 4, 2026 16:49
@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR forwards the existing CLI cancellation signal to local model requests, Gateway model RPCs, and embedding batches.

Example: Press Ctrl+C while openclaw infer embedding create --text "friendly lobster" --json has a pending HTTP request.

  • Before: The request remains pending until the launcher escalates to SIGKILL.
  • After: The request closes promptly and the command exits naturally with status 130 without printing a result.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused repair with shipped-entry-point cancellation evidence, preserved cleanup contracts, meaningful regressions, and no actionable findings; required CI is still pending.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The inspected terminal evidence exercises shipped openclaw.mjs in a real controlling PTY inside secretless Node Docker, using real HTTP clients and a real Gateway: repeated Ctrl+C cases close local-model and embedding requests or the caller RPC, exit naturally with status 130, and suppress results; uninterrupted controls succeed, and Gateway-owned generation continues explicitly. The final head changes only tests and docs after the proven production revision.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Ctrl+C is accepted but pending inference work keeps the command alive until launcher escalation.
Reason: The maintainer-authored direction restores the existing cancellation contract without adding options, public APIs, or another lifecycle owner.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes a current cancellation bug with a focused change; no actionable correctness or security defects were found.

Priority: P2
Reviewed head: 54221c9eaa45d3a022090153598118ccf03586ca

Before merge

None.

Findings

None.

Agent review details

How this fits together

Infer commands translate CLI input into provider requests or Gateway RPCs; the invocation work scope owns cancellation, while existing command and resource owners handle output suppression and cleanup.

flowchart TD
  A[CLI invocation] --> B[Invocation work scope]
  B --> C[Infer command]
  C --> D[Local model transport]
  C --> E[Gateway caller RPC]
  C --> F[Embedding provider]
  D --> G[Cleanup and output suppression]
  E --> G
  F --> G
Loading

Technical review

Best possible solution:

Land the existing signal forwarding and cancellation regressions once the required CI gates pass, preserving Gateway generation ownership.

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

The supplied shipped-CLI PTY runs reproduce forced termination on the base across local model, Gateway caller, and embedding paths; fetched main retains the same affected production code, and this review executed no target code.

Is this the best way to solve the issue?

Forwarding the invocation's existing signal is the smallest complete fix: requests receive cancellation while existing owners retain resource drainage, exit status, and output suppression.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d79c89f95190.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 78c6294 adds src/cli/capability-cli/model.ts:324 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 78c6294f36ec; files: src/cli/capability-cli/model.ts)
  • Tak Hoffman: Raw commit ac66939 adds docs/cli/infer.md:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: ac6693986bbf; files: docs/cli/infer.md)

PR surface

Source +9, Tests -2, Docs +5. Total +12 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 11 2 +9
Tests 2 120 122 -2
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 136 124 +12

Review metrics

Metric Value Why it matters
Production versus test LOC Production +11/-2; tests +120/-122 Small signal-forwarding growth is justified; three distinct cancellation boundaries gain regressions while consolidated fixtures retain existing coverage.

Root-cause cluster

Relationship: canonical
Canonical: #192896
Summary: This PR consolidates two source fixes for omitted invocation cancellation at separate inference boundaries.

Members:

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

Labels

Label changes:

  • add P2: Accepted interrupts fail to drain pending inference requests cooperatively, but uninterrupted inference remains functional.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Accepted interrupts fail to drain pending inference requests cooperatively, but uninterrupted inference remains functional.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 4, 2026, 11:55 AM ET / 16:55 UTC.

@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

CI classification: inherited UI type error

Exact head: 54221c9eaa45d3a022090153598118ccf03586ca. CI run 41871386984 has three failing jobs, all reporting the same unrelated case:

All three fail at ui/src/components/browser/browser-panel-render.tsx(149,11), TS2322: Type 'string | undefined' is not assignable to type 'string'. No additional diagnostic is reported by these jobs. The aggregate ci-gate failure follows them.

This exact location/message is already reproduced identically on the CI merge and its exact main parent in the shared inherited-failure receipt, item 3. That comparison used Node 24.22.1 Docker with CI settings and ran the failing scripts typecheck on both refs. This is the browser-panel TS2322 case, not the older en-terminal/view-pairing failures.

This sweep changes only inference CLI signal forwarding, related tests, and CLI docs. The UI file, its prop types, and typecheck configuration are untouched; the new cancellation wiring cannot cause this static UI assignment error. Focused changed-test typechecking, 110 capability/integration tests, formatting and typed lint pass. All other selected hosted checks succeeded or were intentionally skipped. Product-test cancellations: 0; the one cancelled check is ClawSweeper Dispatch, not a test job. The fresh exact-head ClawSweeper review is ready, 5/6, no findings.

No unrelated repair, hosted rerun, re-push, or main merge was made to change this result. The 18-case real-PTY cancellation proof remains applicable.

@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer override: the only reds are check-prod-types, check-test-types and core-5, all on ui/src/components/browser/browser-panel-render.tsx:149 TS2322, in a file this PR doesn't touch. It fails identically on the exact main parent. Receipts: #192857 (comment) and #192896 (comment)

@obviyus
obviyus merged commit 958ae1a into main Nov 4, 2026
209 of 215 checks passed
@obviyus
obviyus deleted the fix/infer-interrupt-sweep-192818 branch November 4, 2026 17:09
@obviyus

obviyus commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in 958ae1a. Thanks @wangmiao0668000666. Ctrl+C now stops infer model and embedding runs right away.

github-actions Bot pushed a commit to JohanghazaliJohanghazali4763/openclaw that referenced this pull request Nov 4, 2026
fix(infer): stop model and embedding runs on Ctrl+C

`openclaw infer model run` (local and Gateway) and the embedding command did not pass the existing work-scope abort signal, so Ctrl+C did not stop the request. The CLI hung until it was force-killed about 2 seconds later. The commands now pass the signal: the local or embedding provider request closes, the Gateway caller RPC closes, and the CLI exits with 130. Gateway-side generation keeps its existing behavior. Uninterrupted runs are unchanged.

Sweep of #192818 and #192846; both contributor commits are kept.

Evidence: built CLI with a real PTY and SIGINT, against slow local provider and Gateway fixtures, twice per ref for each path. Main reached SIGKILL after 2.05 to 2.27 s; with this change the CLI exited with 130 in 30 to 56 ms, and the provider HTTP request or Gateway RPC closed within 3 ms. All uninterrupted controls pass. Details: openclaw/openclaw#192896 (comment).

Thanks @wangmiao0668000666.

Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
…w#192896)

fix(infer): stop model and embedding runs on Ctrl+C

`openclaw infer model run` (local and Gateway) and the embedding command did not pass the existing work-scope abort signal, so Ctrl+C did not stop the request. The CLI hung until it was force-killed about 2 seconds later. The commands now pass the signal: the local or embedding provider request closes, the Gateway caller RPC closes, and the CLI exits with 130. Gateway-side generation keeps its existing behavior. Uninterrupted runs are unchanged.

Sweep of openclaw#192818 and openclaw#192846; both contributor commits are kept.

Evidence: built CLI with a real PTY and SIGINT, against slow local provider and Gateway fixtures, twice per ref for each path. Main reached SIGKILL after 2.05 to 2.27 s; with this change the CLI exited with 130 in 30 to 56 ms, and the provider HTTP request or Gateway RPC closed within 3 ms. All uninterrupted controls pass. Details: openclaw#192896 (comment).

Thanks @wangmiao0668000666.

Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Nov 6, 2026
…193893)

fix(infer): stop audio transcription on Ctrl+C

`openclaw infer audio transcribe` did not pass the invocation's abort signal to the media execution context, so Ctrl+C did not cancel the provider request and the CLI hung until it was force-killed. The existing signal is now forwarded, as #192896 did for model and embedding runs. No API, default or policy change.

Evidence: built CLI with a real PTY SIGINT during transcription against a slow local provider, twice per ref. Main ended in SIGKILL after about 2 seconds; with this change the CLI exits with 130 in 103 to 117 ms, the HTTP request closes within 4 ms, and no late transcript is printed. Uninterrupted controls match. Details: #193893 (comment).

Thanks @wangmiao0668000666.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
…penclaw#193893)

fix(infer): stop audio transcription on Ctrl+C

`openclaw infer audio transcribe` did not pass the invocation's abort signal to the media execution context, so Ctrl+C did not cancel the provider request and the CLI hung until it was force-killed. The existing signal is now forwarded, as openclaw#192896 did for model and embedding runs. No API, default or policy change.

Evidence: built CLI with a real PTY SIGINT during transcription against a slow local provider, twice per ref. Main ended in SIGKILL after about 2 seconds; with this change the CLI exits with 130 in 103 to 117 ms, the HTTP request closes within 4 ms, and no late transcript is printed. Uninterrupted controls match. Details: openclaw#193893 (comment).

Thanks @wangmiao0668000666.

Co-authored-by: Ayaan Zaidi <[email protected]>
wangmiao0668000666 added a commit to wangmiao0668000666/openclaw that referenced this pull request Nov 6, 2026
`infer tts convert --gateway` did not pass the invocation's abort signal
to the gateway call, so Ctrl+C did not cancel the pending RPC and the CLI
hung until it was force-killed. The existing signal (from
getAsyncWorkSignal) is now forwarded, as openclaw#192896 did for model and
embedding runs. Uninterrupted runs are unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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