Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Interactive Session

This example creates one Claude Code conversation in a dedicated one-replica StatefulSet. It checks out an interactive-review branch and submits an initial prompt before a client connects. Replace the API key placeholder, then apply the files:

kubectl apply -f examples/16-session/
kelos get session interactive-review

When the Session is Ready, connect from a terminal:

kelos session connect interactive-review

The terminal client prints commands when interaction is required. Use /interrupt to stop active work and /answer INPUT_ID QUESTION_ID VALUE for a provider question. Both terminal and web chat accept !COMMAND to run a shell command in the Session workspace. Codex Sessions also accept /goal OBJECTIVE; use /goal to inspect it and /goal pause, /goal resume, or /goal clear to control it.

When enabled, the Kelos Console's Sessions view provides the same conversation. Disconnecting either client does not stop the agent runtime. If the Pod or StatefulSet is removed, the controller recreates it on the Session-owned persistent workspace; active work is marked interrupted and both clients reconnect without replaying it.

Suspend the runtime without deleting the Session or its persistent workspace, then resume it later:

kubectl patch session interactive-review --type merge -p '{"spec":{"suspend":true}}'
kubectl patch session interactive-review --type merge -p '{"spec":{"suspend":false}}'

Deleting the Session deletes its StatefulSet, Pod, governing Service, and persistent workspace and ends the conversation:

kelos delete session interactive-review

To use another supported provider, set spec.worker.type to codex or opencode and provide a credentials Secret with the corresponding CODEX_API_KEY or OPENCODE_API_KEY key.