> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Session Spill Dir • AI Agent SDK

> get_session_spill_dir: Get the session spill directory (last-resort salvage on write failure).

# get\_session\_spill\_dir

Function

> This function is defined in the [**paths**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/paths.md) module.

Get the session spill directory (last-resort salvage on write failure).

When a durable session write fails (disk-full / corruption / permission),
the already-produced turn is spilled here atomically and re-ingested on the
next load (Issue #3597).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_session_spill_dir() -> Path
```

### Returns

**Returns** `Path`

Path to \<state>/state/session\_spill/

## Uses

* `get_state_dir`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/paths.py#L238)
>
> `praisonaiagents/paths.py` at line 238

***

## Related Documentation

> [card] [Session Management](https://praison.ai/docs/docs/concepts/session-management)

> [card] [Sessions Feature](https://praison.ai/docs/docs/features/sessions)

> [card] [Session Persistence](https://praison.ai/docs/docs/features/session-persistence)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.