# ThreadAgentSwitchPromptScreen

> **Class** in `deepagents_code`

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

Ask before changing agents to resume a thread.

## Signature

```python
ThreadAgentSwitchPromptScreen(
    self,
    *,
    thread_id: str,
    current_agent: str,
    thread_agent: str,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `thread_id` | `str` | Yes | Thread the user asked to resume. |
| `current_agent` | `str` | Yes | Agent active in the current session. |
| `thread_agent` | `str` | Yes | Agent that owns the requested thread. |

## Extends

- `ModalScreen[ThreadAgentSwitchChoice]`

## Constructors

```python
__init__(
    self,
    *,
    thread_id: str,
    current_agent: str,
    thread_agent: str,
) -> None
```

| Name | Type |
|------|------|
| `thread_id` | `str` |
| `current_agent` | `str` |
| `thread_agent` | `str` |


## Properties

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

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/thread_agent_switch/ThreadAgentSwitchPromptScreen/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/thread_agent_switch/ThreadAgentSwitchPromptScreen/on_mount)
- [`action_switch()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/thread_agent_switch/ThreadAgentSwitchPromptScreen/action_switch)
- [`action_cancel()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/thread_agent_switch/ThreadAgentSwitchPromptScreen/action_cancel)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/tui/widgets/thread_agent_switch.py#L22)