# Chat Sessions & Limits

A **working session** is the server-side sandbox that runs the AI for one chat. It boots when you open a chat, holds the AI's context and the files it is working on, and is released when the chat goes quiet or a request runs too long. The conversation is not the session: a released session takes nothing away from your history, and the next message starts a new one. This page names every state a chat can be in, gives the exact limit behind each one, and explains what the AI keeps when a chat resumes — the questions behind most "why did my chat stop?" support tickets.

## Prerequisites

- Signed in to Treasure AI Studio ([Getting Started](/products/ai-studio/getting-started))


## Chat States

A chat is always in one of these states. Each one is visible in the composer or the message stream, so you can tell whether Studio is waiting on the AI, on the platform, or on you.

| State | What You See | What It Means |
|  --- | --- | --- |
| **Active** | Normal input area | Chat is ready for messages |
| **Thinking** | "Thinking" with bouncing dots | AI is reasoning before responding |
| **Streaming** | Stop button, text appearing | AI is generating a response |
| **Waiting** | A status label above the input (see [Status Indicators](#status-indicators)) | The turn is in flight and nothing has streamed back yet — the label names the stage Studio is working through |
| **Question pending** | Question card above the input, input disabled | AI is asking you a question — answer before continuing (see [Question Cards](/products/ai-studio/chat/chat#question-cards)) |
| **Connection pending** | "Connection Required" card in the stream | The AI needs a connector you have not authorized (see [Connection Requests](/products/ai-studio/chat/chat#connection-requests)) |
| **Credit limit reached** | "Daily limit reached" in place of the credit indicator | Your daily credit quota is spent; the chat accepts messages again after it resets (see [Credit Policy](/products/ai-studio/credits/credit-policy)) |
| **Session ended** | Banner explaining why, sometimes with a **Resume** button | The working session was released. Send a message to continue (see [Resuming a Chat](#resuming-a-chat)) |


## Status Indicators

The first message in a chat takes a few seconds to get moving: Studio has to bring up the session's sandbox and initialize the agent before the AI can answer. While that happens — and whenever a turn is in flight with nothing streamed back yet — a status label above the input stands in for the response.

| Label  | What It Means  |
|  --- | --- |
| **Booting secure sandbox...** | Studio is bringing up the sandbox for a session that is starting cold. Normally about two seconds |
| **Initializing agent...** | The agent is loading its context, skills, and work folder instructions inside that sandbox. Typically two to three seconds more |
| **Waiting for response...** | The request is with the model and no text has come back yet. A chat you are already working in starts here, skipping the two labels above |
| **Compacting context...** | The conversation reached the context limit and Studio is summarizing older messages before continuing (see [In-Session Memory](/products/ai-studio/chat/in-session-memory)) |
| **Server error, retrying...** | A model call failed and Studio is retrying it. No action needed unless it repeats |


The sequence advances on its own, so there is nothing to act on while it runs — and reaching **"Waiting for response..."** is the normal end of the sequence, not a sign that something is wrong.

**The label stops showing after a minute.** If nothing has streamed back within 60 seconds of your message, Studio drops the status label. The request has not been dropped with it: a long-running task can work for hours with no indicator, and a request that genuinely stalls raises a session-end banner instead — see [How Long Before a Session Ends](#how-long-before-a-session-ends).

## How Long Before a Session Ends

Studio releases a working session to free resources. Four limits can end one, and the banner in the chat names which was reached.

| What happened  | Time limit  | Banner  |
|  --- | --- | --- |
| You opened a chat and never sent a message | 5 minutes | **Session ended — no message was sent.** |
| You stopped sending messages and the AI had nothing left to run | 30 minutes of inactivity | **Session ended due to inactivity.** |
| A request stopped making progress partway through | 8 minutes with no progress | **Session was interrupted — processing took too long.** |
| A single request kept running without finishing | 12 hours | **Session was interrupted — request timed out.** |


A session can also be released for a platform-side reason that fits none of these, which reads **"Session was interrupted unexpectedly."** and is handled the same way.

The inactivity clock pauses while the AI is working
The 30-minute inactivity limit applies only when nothing is running. While the AI is still working on your request, the session is not released for inactivity — the only limit that applies is the 12-hour cap on a single request. So you can send a long-running task, leave the chat, and come back to it later.

## Resuming a Chat

Every ended session is recoverable from the chat itself, and **sending a message is always enough**. What the banner offers depends on who ended the session:

- **You went quiet** (no message sent, or 30 minutes of inactivity) — a neutral banner says the session ended and invites you to send a message. There is no **Resume** button, because your next message is the resume.
- **Studio interrupted the work** (no progress, request timed out, or an unexpected interruption) — a warning banner appears with a **Resume** button. Clicking it sends a short prompt on your behalf to start the session again; the button switches off once you have sent a message yourself, since the session is already back.


The session is the casualty, not the conversation. The full message history stays visible while the session is gone, and a resumed chat continues in place rather than starting a new one. What does eventually remove a conversation is separate from any of this: you delete it, you delete the work folder it belongs to, or it passes your organization's retention period — which always applies, and is 28 days from the chat's creation by default. See [Chat History](/products/ai-studio/chat/chat-history) and [Chat Data Retention](/products/ai-studio/security/data-retention).

### What the AI Remembers After a Resume

Studio resumes the *same* agent session rather than re-reading the visible transcript, so the AI keeps the context it had — earlier decisions, query results, and tool output included — and a resumed chat behaves like one that never stopped. The session transcript is stored with the chat, which is what makes this survive the sandbox being released.

If that transcript cannot be resumed, Studio starts a fresh session instead: the conversation and its files are untouched, but the AI begins without the earlier context. Re-state the key details (the table you were querying, the segment logic you agreed on) and it picks the work back up.

## Sandbox Execution Environment

Every working session runs in a server-side sandbox — not on your local machine — with no access to your computer, other users' chats, or your real credentials. If the sandbox hits a problem, the chat says so:

> "The sandbox environment crashed unexpectedly and is restarting. Please wait a moment and try again. If the problem persists, contact support."


The sandbox restarts automatically, and your next message runs in the restarted one. See [Security Overview](/products/ai-studio/security) for what the sandbox boundary guarantees and what persists after a chat ends.

## Troubleshooting

| Issue | Solution |
|  --- | --- |
| **"Waiting for response..."** never turns into a response | This is the normal label for a request that is with the model, so seeing it is not itself a fault. Give a heavy request a few minutes; if the work has genuinely stalled, the session-end banner appears after 8 minutes without progress. To start over sooner, refresh the page (Web) or restart the app (Desktop, Mobile) and send again |
| The banner has no **Resume** button | The session ended because the chat went quiet, and your next message resumes it. Only platform-side interruptions offer the button |
| **Resume** is greyed out | You have already sent a message since the banner appeared, so the session is running again |
| The AI lost the thread after a long pause | The session could not be resumed and started fresh. Re-state the table names, filters, or segment logic it needs; to carry standing context across sessions, keep the work in a [work folder](/products/ai-studio/concepts/work-folders) |
| A long-running request never finishes | Requests are capped at 12 hours. Split the task (narrower time range, fewer tables) and send it again |


## Next Steps

- [AI Chat Interface](/products/ai-studio/chat/chat) — Sending messages and reading responses
- [In-Session Memory](/products/ai-studio/chat/in-session-memory) — How context fills up and gets compacted
- [Chat History](/products/ai-studio/chat/chat-history) — How conversations are saved and managed
- [Security Overview](/products/ai-studio/security) — What the sandbox isolates and what persists