---
title: "Get persisted Zwiebelmodus context state for a CYA session (v0.37.0)"
method: GET
path: "/api/cya/sessions/:id/context-state"
tags: ["CYA Agent"]
---

# Get persisted Zwiebelmodus context state for a CYA session (v0.37.0)

`GET /api/cya/sessions/:id/context-state`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/api/cya/sessions/:id/context-state`
- Auth: none declared

Returns the serialized CyaContextManager zoom-state for session resumption. Enables refine calls to continue with identical onion context. Object Store namespace: cya_context_states.

## Path parameters

- `id` string, required

## Query parameters

- `token` string

## Response `200`

Persisted context state

- object
  - `sessionId` string
  - `outerContext` object, nullable
    - `goal` string, nullable
    - `focusArea` string[]
  - `currentDepth` integer
  - `breadcrumb` string[]
  - `iterationLog` object[]
  - `maxIterations` integer
  - `zoomStack` string[]: nodeId history for zoomIn operations
  - `savedAt` string, date-time

## Other responses

- `404`: No context state found for this session

---

[API](https://skmtc.dev/cernion/apis/cernion-energy-tools-api.md) · [All operations](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/revisions/cdb94473b538?raw)
