ClaudeCode.Session (ClaudeCode v0.16.0)

View Source

GenServer that manages Claude Code sessions.

Each session maintains a connection to Claude (via an adapter) and handles request queuing, subscriber management, and session continuity.

The session uses adapters for communication:

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts a new session GenServer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

Starts a new session GenServer.

The session lazily connects to the adapter on the first query.