> ## 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.

# Session Persist Failed Input • AI Agent SDK

> SessionPersistFailedInput: Input for SESSION_PERSIST_FAILED hooks (a durable session write failed).

# SessionPersistFailedInput

> Defined in the [**events**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/events.md) module.

AI Agent

Input for SESSION\_PERSIST\_FAILED hooks (a durable session write failed).

Fired by the session store when an `add_message`/`set_chat_history`
write cannot be persisted (disk-full, SQLite/FTS corruption, permission /
`OSError`). Instead of losing the already-produced turn silently, the
store spills it to an atomic fallback file and fires this hook so operators
can observe/route the failure (metrics, alerting, forensics) — mirroring the
`MESSAGE_UNDELIVERED` posture on the outbound side (Issue #3597).

`spilled` reports whether the last-resort fallback write itself
succeeded; `spill_path` is the file the turn was salvaged to (when any).

## Properties

**role** `str`

No description available.

**content** `str`

No description available.

**error** `str`

No description available.

**spilled** `bool`

No description available.

**spill\_path** `Optional[str]`

No description available.

> [accordion] Internal & Generic Methods
>
> * **to\_dict**: Generic utility method.

## Source

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

***

## 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.