# ResumeCompactPromptScreen

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/modals/resume_compact/ResumeCompactPromptScreen)

Ask whether to compact a just-resumed thread before the next turn.

## Signature

```python
ResumeCompactPromptScreen(
    self,
    *,
    context_tokens: int,
    threshold: int,
    pending_work: bool,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `context_tokens` | `int` | Yes | Latest model-reported context size for the thread. |
| `threshold` | `int` | Yes | Configured token count that triggered the suggestion. |
| `pending_work` | `bool` | Yes | Whether the checkpoint still holds unfinished work, which compacting must first cancel. |

## Extends

- `ModalScreen[bool]`

## Constructors

```python
__init__(
    self,
    *,
    context_tokens: int,
    threshold: int,
    pending_work: bool,
) -> None
```

| Name | Type |
|------|------|
| `context_tokens` | `int` |
| `threshold` | `int` |
| `pending_work` | `bool` |


## Properties

- `can_focus`
- `BINDINGS`
- `CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/modals/resume_compact/ResumeCompactPromptScreen/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/modals/resume_compact/ResumeCompactPromptScreen/on_mount)
- [`action_compact()`](https://reference.langchain.com/python/deepagents-code/tui/modals/resume_compact/ResumeCompactPromptScreen/action_compact)
- [`action_skip()`](https://reference.langchain.com/python/deepagents-code/tui/modals/resume_compact/ResumeCompactPromptScreen/action_skip)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/tui/modals/resume_compact.py#L19)