# stop

Request cancellation of the current script.

```js
stop()
```

## Arguments

No arguments.

## Returns

Throws the script-stop signal; execution should not continue.

## Example

```js
if (!appInfo("com.apple.Preferences").installed) stop();
```

## Notes

Do not swallow stop/cancellation errors in retry loops.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
