# libtmux_mcp.prompts.recipes.interrupt_gracefully

- **Module:** libtmux_mcp.prompts.recipes
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/prompts/recipes.py#L155
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-prompts-recipes-interrupt_gracefully/

```
libtmux_mcp.prompts.recipes.interrupt_gracefully(pane_id: str) -> str
```

Interrupt a running command and verify the prompt returned.

Sends ``C-c`` through ``send_keys(literal=True)``, then waits on
shell-prompt patterns via ``wait_for_text``. Fails loudly if the
process ignores SIGINT — the right escalation point is the caller,
not an automatic ``C-\`` follow-up (SIGQUIT can core-dump).

## Parameters

- `pane_id` (str): Target pane.
