How do I stopcancel a running task

Send any of these as a standalone message (no slash):
stop
abort
esc
wait
exit
interrupt
These are abort triggers (not slash commands).
For background processes (from the exec tool), you can ask the agent to run:
process action:kill sessionId:XXX
Slash commands overview: see Slash commands.
Most commands must be sent as a standalone message that starts with /, but a few shortcuts (like /status) also work inline for allowlisted senders.