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

# Session state issues

> Troubleshoot session lifecycle failures, realtime completion, and terminal error states.

# Session state issues

Use this page when a detection session does not reach the terminal state you expect.

## Common symptoms

* a session stays in `created`, `streaming`, or `finalizing`
* you receive `session_done` with `failed` or `cancelled`
* replay completes locally but the session summary does not match your expectation

## What to check

* Make sure you wait for the session to complete before reading results. The SDKs handle this automatically with `process_video()` / `processVideo()` and `start_camera()` / `startCamera()`.
* If using manual session control, keep reading events until you receive `session_done`.
* Fetch the session resource after completion if you need the authoritative summary.

## Exact-count troubleshooting

If replay counts do not match your expected results:

* confirm you used the intended released MoveSpec version
* confirm you are on the pinned MediaPipe compatibility line
* compare the final `accepted_frames_total` with the expected replay path

## Cancellation and failure

If the session is `cancelled` or `failed`:

* inspect the top-level `error_code` and `error_message`
* inspect `terminal_outcome` for the coarse terminal summary
* retry only after you understand the failure cause (authentication, validation, or compatibility)

## Next references

* `/api-reference/realtime-protocol`
* `/api-reference/runtime-contract`
* `/troubleshooting/sdk-compatibility`
