# RestartPromptScreen

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/restart_prompt/RestartPromptScreen)

Modal asking whether to restart the server for a spawn-time change.

Serves both the post-install offer and the post-`/auth` web-search offer;
the caller supplies the title `verb` and `body` copy.

Dismisses with `"restart"` when the user accepts and `"later"` when the
user defers. Esc is treated as "later" so the user is never forced into a
restart they did not explicitly choose.

## Signature

```python
RestartPromptScreen(
    self,
    label: str,
    *,
    verb: str,
    body: str | None = None,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `label` | `str` | Yes | The subject surfaced in the title (e.g. an installed extra name, or a saved credential like ``"Tavily API key"``). |
| `verb` | `str` | Yes | Past-tense action shown before `label` in the title — e.g. `"Installed"` for the post-install flow or `"Saved"` for a saved credential. Required (no default) so each flow states its own intent and a future caller can't inherit install-only copy. |
| `body` | `str \| None` | No | Optional override for the explanatory line under the title. Defaults to the generic restart copy. (default: `None`) |

## Extends

- `ModalScreen[RestartChoice]`

## Constructors

```python
__init__(
    self,
    label: str,
    *,
    verb: str,
    body: str | None = None,
) -> None
```

| Name | Type |
|------|------|
| `label` | `str` |
| `verb` | `str` |
| `body` | `str \| None` |


## Properties

- `BINDINGS`
- `CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/restart_prompt/RestartPromptScreen/compose)
- [`action_restart()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/restart_prompt/RestartPromptScreen/action_restart)
- [`action_later()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/restart_prompt/RestartPromptScreen/action_later)
- [`action_cancel()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/restart_prompt/RestartPromptScreen/action_cancel)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e14e0adcbe78565ed3650e7f24b2a775d5437d25/libs/code/deepagents_code/tui/widgets/restart_prompt.py#L32)