Quick answer: You can cancel a long-running scenario in the desktop with the Stop action, which ends the local run and stops streaming progress. But the local stop does not cancel work already running on a remote server. To stop a remote task, send an explicit cancellation request, such as a CancelTask call, rather than assuming the local stop reached the server.
Why a local stop is not a remote cancel
When the scenario engine runs in the desktop main process, the Stop action ends what happens on your machine: the local run halts, progress stops streaming, and the report reflects that the run was cancelled. That is a local boundary.
The remote system is a separate process. A request already delivered may keep executing after the local run stops, especially for long jobs, streaming work, or tasks handed to another agent. Closing the client does not tell the server to undo or halt the work.
| Action | What it stops | What it does not stop |
|---|---|---|
| Local Stop | The desktop run and streamed progress | Work already running on the server |
| Remote cancel request | The task on the remote system | It cannot undo completed side effects |
When to send an explicit cancel
Use a cancellation request when the thing you need to stop lives on the server.
- A remote task is still processing after the local run is stopped.
- A streaming or async job keeps emitting events server-side.
- An agent on another system is working on a task you no longer want.
For agent and A2A work, a CancelTask request carries the intent to the remote system. The local Stop action alone does not perform that step, so the two should be treated as separate actions rather than assumed to be one.
A careful cancellation sequence
- Use the local Stop to end the desktop run and stop the streaming output.
- Check whether the remote task is still running through its status.
- If it is, send the explicit cancellation request with the task reference.
- Confirm the remote status moves to a cancelled or terminal state.
- Record the outcome rather than assuming the cancel landed.
Confirming the remote status matters because a cancel request can be delivered while the task reaches completion on its own. The status tells you which actually happened, and keeps you from asserting a cancellation that did not take effect.
Set a clear threshold before you start a long run, so a job that passes its expected duration gets investigated rather than left open. A run that hangs without a defined limit is easy to forget, and an orphaned task can hold locks or consume resources long after the client moved on. Pair the Stop action with a status check so no run disappears into an unknown state.
Honest limits
Cancellation does not roll back side effects that already completed. A request that wrote a record, sent a message, or changed state before the cancel arrived cannot be undone by the cancel itself. Treat cancellation as a stop against further work, not a rollback, and verify what already changed.
The engine runs connected requests in the main process with streamed progress and a cancel action, which keeps a hung run from blocking the client. Scenarios stay outside the OpenAPI document with no x-scenarios keys.
Powerduck keeps the local Stop and the remote cancellation paths distinct, so you can see what ended on the desktop and what still needs an explicit request on the server.
Frequently asked questions
Does the Stop button cancel the remote task? No. It ends the local run and streamed progress. Work already running on the server needs an explicit cancellation request.
How do I stop a remote agent task? Send a CancelTask request with the task reference, then confirm the remote status reaches a cancelled or terminal state.
Does cancellation undo completed work? No. Side effects that finished before the cancel arrived stay in place. Cancellation stops further work, it does not roll back earlier changes.
The bottom line
Keep two boundaries straight: the local Stop ends the desktop run and its streaming output, while remote work keeps running until you send an explicit cancel request and confirm the status. Never assume closing the client reaches the server, and remember that cancellation does not undo side effects already completed. Treating the stop as a full remote cancellation is how orphaned tasks keep running unnoticed. More in the API scenario testing guide.

