# SessionCostWarningScreen

> **Class** in `deepagents_code`

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

Keep the session cost warning visible until acknowledged.

## Signature

```python
SessionCostWarningScreen(
    self,
    *,
    cost_usd: float,
    threshold: float,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `cost_usd` | `float` | Yes | Current estimated session cost in US dollars. |
| `threshold` | `float` | Yes | Configured warning threshold in US dollars. |

## Extends

- `ModalScreen[None]`

## Constructors

```python
__init__(
    self,
    *,
    cost_usd: float,
    threshold: float,
) -> None
```

| Name | Type |
|------|------|
| `cost_usd` | `float` |
| `threshold` | `float` |


## Properties

- `can_focus`
- `CSS_PATH`
- `BINDINGS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/modals/session_cost/SessionCostWarningScreen/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/modals/session_cost/SessionCostWarningScreen/on_mount)
- [`action_cancel()`](https://reference.langchain.com/python/deepagents-code/tui/modals/session_cost/SessionCostWarningScreen/action_cancel)

---

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