Sessions
Start a session for a worktree or return its live one, read it, follow its events, update and stop it.
List sessions
List the caller's live sessions, or with scope org the organisation's.
The caller's own sessions and those shared with it, each with the caller's role. With scope org, every session of the organisation, for a person or a service holding dev:audit.read as well (403 not_allowed otherwise), which the console's agents view reads; a session the caller neither owns nor is a member of answers without role, and its other reads stay its owner's and members'. started_by keeps the sessions an agent opened (agent: an agent's, a key's or a service's subject, or a person's sign-in whose client named a harness, requester_agent) or a person opened themselves (person).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cursor | string | Optional | |
limit | integer | Optional | |
state | string | Optional | paused: stopped with its checkpoint and kept; dev.sessions.start places it again |
tree_id | string | Optional | |
scope | string | Optional | |
started_by | string | Optional |
Response
datadata[].branchdata[].clientsdata[].clients[].client- the daemon's label: mcp:<pid>, cli, browser
data[].clients[].open_streamsdata[].clients[].servicedata[].clients[].streams_last_mindata[].clients[].waiting- streams held while the service is not ready
data[].created_atdata[].diagnostic_counts- per service; the records come through the diagnostics stream
data[].diagnostic_counts[].digest- over a salt only the worker holds and the records: changes when they do
data[].diagnostic_counts[].errorsdata[].diagnostic_counts[].generationdata[].diagnostic_counts[].servicedata[].diagnostic_counts[].warningsdata[].dotfiles- the owner's dotfiles as dev up decided them; null when the owner set none
data[].dotfiles.detaildata[].dotfiles.nextdata[].dotfiles.reason- One of
policy_off,host_not_allowed,vendor,egress_ceiling,egress_denied,agent_session data[].dotfiles.repodata[].dotfiles.state- One of
granted,skipped,unset data[].epochdata[].expires_at- while live: the stop of the policy's lifecycle.max_lifetime_secs, whatever the activity, fixed at create and at a start; null is no limit. paused: when its checkpoint expires and the session ends
data[].exposedata[].expose[].kind- internal: reached only by worker-side services through the guest; never bound locally, never a tunnel stream or an SSH forwardOne of
http,tcp,internal data[].expose[].namedata[].expose[].portdata[].expose[].targetdata[].from_session- source checkpoint: the lost session this one resumed
data[].generationdata[].health- the worst service's
data[].health.detaildata[].health.nextdata[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop data[].health.state- One of
healthy,degraded,failed data[].iddata[].idle_expires_atdata[].labeldata[].last_activity_atdata[].last_checkpoint_at- writer cloud: the last checkpoint, so a person sees what a lost host could cost
data[].last_push- dev.sessions.get, writer cloud: the newest push to the session's branch; absent before the first
data[].last_push.atdata[].last_push.change_request_urldata[].last_push.new- the commit it pushed
data[].last_push.referencedata[].latencydata[].latency[].at- added by the cli when it merges the daemon's hopsOne of
worker,this_machine data[].latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec data[].latency[].last_msdata[].latency[].overdata[].latency[].p50_msdata[].latency[].p95_msdata[].latency[].samplesdata[].latency[].target_msdata[].needs_open- needs nobody answered or dismissed yet: the session needs its person (dev.sessions.needs.list)
data[].ownerdata[].parameters- the template's parameters as resolved at create, in the template's order; empty for a template without any
data[].parameters[].mutabledata[].parameters[].namedata[].parameters[].valuedata[].pausing- stopping: the stop keeps the session, which becomes paused once its checkpoint is stored
data[].phase- One of
creating,placing,syncing,preparing,starting,ready data[].policy- the policy version the session started with and what it allows
data[].policy.clipboard- One of
allow,deny data[].policy.download- One of
allow,deny data[].policy.lifecycle- the limits the session started under
data[].policy.lifecycle.auto_stop- what an idle stop, the budget's hard stop and max_lifetime_secs do to a cloud-writer session: pause keeps it with its checkpoint for dev.sessions.start, end ends it; a local writer always endsOne of
pause,end data[].policy.lifecycle.idle_max_secs- at least idle_min_secs; idle_secs and a person's idle_secs lie between; a template that names an idle over it is refused at dev.sessions.up (422 template_invalid, finding idle_over_policy with its next), the 60 min default is pulled down
data[].policy.lifecycle.idle_min_secsdata[].policy.lifecycle.idle_secs- the idle stop when the person names none; null is the template's (60 min unless it says)
data[].policy.lifecycle.lifetime_warning_secs- shorter than max_lifetime_secs
data[].policy.lifecycle.max_lifetime_secs- from create to stop, whatever the activity; null, the default, is no limit; ciresk dev policy preset no-local-checkout suggests 86400
data[].policy.lifecycle.max_session_cpus_milli- the largest cpu reservation, in thousandths of a cpu; null is the worker's own limit (422 session_too_large)
data[].policy.lifecycle.max_session_memory_bytes- the largest memory reservation one template may declare; null is the worker's own limit (422 session_too_large)
data[].policy.lifecycle.sessions_per_org- live sessions of the organisation, never above the installation's own ceiling (409 org_session_limit)
data[].policy.lifecycle.sessions_per_person- live sessions one person and their agents hold; at most sessions_per_org (409 person_session_limit)
data[].policy.local_sync- One of
allow,deny data[].policy.port_forward- One of
allow,deny data[].policy.sharing- One of
false,view,use data[].policy.ssh- One of
allow,deny data[].policy.ssh_exec- One of
allow,deny data[].policy.upload- One of
allow,deny data[].policy.versiondata[].preset- the preset the session was created with
data[].queuedata[].queue.per_principaldata[].queue.queueddata[].queue.queued[].clientdata[].queue.queued[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued data[].queue.queued[].op- One of
exec,reset,restart,login,checkpoint data[].queue.queued[].position- 0 while running
data[].queue.queued[].principal- the stream's verified principal
data[].queue.queued[].waiting_msdata[].queue.runningdata[].queue.running[].clientdata[].queue.running[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued data[].queue.running[].op- One of
exec,reset,restart,login,checkpoint data[].queue.running[].position- 0 while running
data[].queue.running[].principal- the stream's verified principal
data[].queue.running[].waiting_msdata[].queue.slotsdata[].refused_pathsdata[].refused_paths.pathsdata[].refused_paths.totaldata[].relay_urldata[].requesterdata[].requester_agent- the agent that opened the session as records name it: the verified agent and the harness its Ciresk-Agent header named; display only, null for a person acting themselves and for a session opened before
data[].resources- dev.sessions.get only: the session's cpu, memory and disk now, against the template's resources, and one sample a minute for the last hour, oldest first. cpu and memory are the services' metrics together, disk the bytes the session's directory holds; a value the worker does not report is null now and left out of a sample, never 0. the hops now are the session's latency
data[].resources.cpu_milli- thousandths of a cpu
data[].resources.disk_bytesdata[].resources.historydata[].resources.history[].atdata[].resources.history[].cpu_millidata[].resources.history[].disk_bytesdata[].resources.history[].latencydata[].resources.history[].memory_bytesdata[].resources.limitsdata[].resources.limits.cpus_millidata[].resources.limits.disk_bytesdata[].resources.limits.memory_bytesdata[].resources.limits.memory_max_bytesdata[].resources.memory_bytesdata[].resources.sampled_atdata[].role- the caller's role; left out for a session dev.sessions.list with scope org shows to an audit reader who is neither its owner nor a memberOne of
owner,use,view data[].rootdata[].seeddata[].seed.generationdata[].seed.rootdata[].seed.stale- a path under data.inputs changed since; next: ciresk dev reset --rebuild
data[].seed.taken_atdata[].seed.volumesdata[].servicesdata[].services[].close_reason- One of
idle,oom,crashed,requested,kill data[].services[].detaildata[].services[].health- ; every non-healthy state carries the exact next command
data[].services[].health.detaildata[].services[].health.nextdata[].services[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop data[].services[].health.state- One of
healthy,degraded,failed data[].services[].metricsdata[].services[].metrics.baseline_rss_bytesdata[].services[].metrics.cache_bytesdata[].services[].metrics.cpu_millidata[].services[].metrics.fdsdata[].services[].metrics.hmr_p50_msdata[].services[].metrics.inotify_watchesdata[].services[].metrics.io_bytes- bytes the container's processes read and wrote (cgroup io.stat), sampled while it starts
data[].services[].metrics.rss_bytesdata[].services[].metrics.sampled_atdata[].services[].namedata[].services[].restartsdata[].services[].serving- the generation this service serves
data[].services[].started_at- when the running process started; how long a start or a prepare step has taken
data[].services[].state- One of
waiting,starting,ready,completed,failed,stopped,not_started data[].source- One of
worktree,trunk,branch,checkpoint data[].ssh_host_key- the session's openssh host key line
data[].state- paused: stopped with its checkpoint and kept; dev.sessions.start places it againOne of
pending,starting,ready,degraded,disconnected,lost,stopping,paused,stopped,failed data[].state_reason- why the session is in its state. pending: no_capacity, worker_starting or no_worker, or agent_exit_unavailable while no worker that runs the agent's own exit asks for it; lost: worker_lost; stopping, paused and stopped: requested, idle, max_lifetime, budget, kill, access_changed, recreated, checkpoint_expired (a paused session's checkpoint expired, dev), or stopped when the holder stopped with no reason; failed: the worker's failure code, template_digest_mismatch, start_failed, services_failed or an infrastructure code such as disk_full or toolchain_unavailable. a service that never gets ready leaves the session degraded with no reason (
ciresk dev upanswers the CLI error service_not_ready) data[].switchdata[].switch.fromdata[].switch.phase- One of
applying,preparing,restarting data[].switch.todata[].templatedata[].template_digestdata[].timings- milliseconds from create, derived from the session's events
data[].timings.create_msdata[].timings.lease_msdata[].timings.prepare_msdata[].timings.ready_msdata[].timings.sync_msdata[].tree_iddata[].unpushed_files- writer cloud: files changed since the trunk tree, until forge pushes them
data[].view- whether the session's view hides any path; never which
data[].view.policy_versiondata[].view.restricteddata[].web_gateway- dev.sessions.get only: whether the installation serves sessions in the browser (a preview domain is configured); the console offers no browser button without it
data[].weightdata[].weight.cpus_millidata[].weight.disk_bytesdata[].weight.memory_bytesdata[].weight.memory_max_bytesdata[].workerdata[].worker_release- the release the holding worker registered with (its software_version label), so a rollout is visible
data[].workers- only on a pending session whose state_reason is no_worker because the organisation runs on its own workers: nothing of the cell starts one, so a client says to start one of the organisation's enrolled workers; absent otherwiseOne of
customer data[].workspacedata[].workspace.bytes_materialiseddata[].workspace.files_materialiseddata[].workspace.files_totaldata[].workspace.recent_waitsdata[].workspace.wait_p95_msdata[].workspace.waits_last_mindata[].writer- One of
local,cloud has_morenext_cursor
curl "$CIRESK_API/v1/dev/sessions" \
-H "Authorization: Bearer $CIRESK_KEY"Start or return a session
Create a session for a worktree on this device, or return its live one.
Create-or-return keyed by (org_id, tree_id, device_fingerprint) among live sessions. The return path answers 403 not_allowed when the session's owner is not the caller's accountable person, and never grants a device or mints a ticket. A lost session is moved to pending; a stopping one is never returned: it ends and a new session takes its place. With a branch, the writer row (org_id, remote_fingerprint, branch) is taken in the same transaction. Idempotency-Key is not required: the tuple is the key. A remote session (source trunk, writer cloud) has no worktree and no device: its template is the version promoted for the repository, read by dev-api, its key is derived from the new session's id, so every call creates one, it grants no device, and it takes the writer row on refs/heads/ciresk/<session_id> as writer cloud, so a worktree on that branch gets 409 writer_conflict. The cli's up --remote sends its dev file, a key of its own and its device as before. A branch session (source branch, writer cloud; decision 4) is a remote session that starts from the tree of ci's newest finished run on branch, any verdict, resolved through the ci cell with the organisation's dev-ci-jobs credential before anything is written; its journal's session.created keeps the branch, the job and the root it started from. The template's parameters resolve as their defaults, then the preset's values, then the request's; the resolved values and the preset are recorded on the session, in session.created and in the audit row. The return path compares only the parameters the request names, directly or through its preset: an immutable one that differs is 409 parameter_immutable, a mutable one 409 parameters_changed (a person's ciresk dev up then recreates the session); recreate takes any values.
Request body
branch- source worktree: the branch the worktree is on, whose writer row it takes; source branch: the ref whose newest ci run's tree it starts from (required); never with trunk or checkpoint
device_public_key- ed25519 public key, base64url; part of the session key, granted on 201 only; source worktree only
from_session- source checkpoint: the ended cloud-writer session (lost, stopped or failed, not killed) of the same repository whose last checkpoint root and branch it continues, ending a lost one as stopped with state_reason resumed; only that session's owner may resume it (403 not_allowed otherwise, 409 no_checkpoint when it is running, killed or has no checkpoint, 409 already_resumed when another session continued it, 422 validation_failed for another repository's session; dev)
head- the commit at HEAD
idle_secs- the person's idle stop for this session; within the policy's lifecycle bounds (422 idle_out_of_bounds), else the policy's lifecycle.idle_secs, else the template's, pulled into the bounds
labellazy- materialise file content on first read
local_ports- per http port of the template the client's machine refuses to bind with nothing listening (a Windows excluded port range), the stable fallback it serves instead: keys are the template's port numbers; the compile makes the fallback the session's port and every {origin:p}, and aliases it to the in-pod port in the pod; a key that is no http port of the template, or a fallback the template already uses, is 422 template_invalid with the finding local_port_unknown or local_port_taken; absent or empty when no port moved
parameters- values of the template's parameters by name, as strings its declaration types: over the defaults and the preset's; never a secret
prepare_locks- per shared prepare step, the client's lock of the step's inputs in the tree it pushes: keys are step names; the worker mounts the prebuilt layer of exactly that lock when it holds one; a hint, since a wrong lock only misses
preset- a preset of the template, whose values apply before parameters
recreateremote_fingerprintrootsource- trunk: a remote session from the repository's trunk generation, no local tree; branch: a remote session from the tree of ci's newest finished run on
branch; checkpoint: a cloud-writer session continued from an ended one's last checkpoint, on its branchOne ofworktree,trunk,branch,checkpoint templatetemplate_b64- the dev file's bytes as committed in the tree
template_digesttemplate_pathtree_id- ci-v1.0.7 per-worktree identity
writer- local with source worktree, cloud with source trunk, branch or checkpointOne of
local,cloud
Response
branchclientsclients[].client- the daemon's label: mcp:<pid>, cli, browser
clients[].open_streamsclients[].serviceclients[].streams_last_minclients[].waiting- streams held while the service is not ready
created_atdiagnostic_counts- per service; the records come through the diagnostics stream
diagnostic_counts[].digest- over a salt only the worker holds and the records: changes when they do
diagnostic_counts[].errorsdiagnostic_counts[].generationdiagnostic_counts[].servicediagnostic_counts[].warningsdotfiles- the owner's dotfiles as dev up decided them; null when the owner set none
dotfiles.detaildotfiles.nextdotfiles.reason- One of
policy_off,host_not_allowed,vendor,egress_ceiling,egress_denied,agent_session dotfiles.repodotfiles.state- One of
granted,skipped,unset epochexpires_at- while live: the stop of the policy's lifecycle.max_lifetime_secs, whatever the activity, fixed at create and at a start; null is no limit. paused: when its checkpoint expires and the session ends
exposeexpose[].kind- internal: reached only by worker-side services through the guest; never bound locally, never a tunnel stream or an SSH forwardOne of
http,tcp,internal expose[].nameexpose[].portexpose[].targetfrom_session- source checkpoint: the lost session this one resumed
generationhealth- the worst service's
health.detailhealth.nexthealth.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop health.state- One of
healthy,degraded,failed ididle_expires_atlabellast_activity_atlast_checkpoint_at- writer cloud: the last checkpoint, so a person sees what a lost host could cost
last_push- dev.sessions.get, writer cloud: the newest push to the session's branch; absent before the first
last_push.atlast_push.change_request_urllast_push.new- the commit it pushed
last_push.referencelatencylatency[].at- added by the cli when it merges the daemon's hopsOne of
worker,this_machine latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec latency[].last_mslatency[].overlatency[].p50_mslatency[].p95_mslatency[].sampleslatency[].target_msneeds_open- needs nobody answered or dismissed yet: the session needs its person (dev.sessions.needs.list)
ownerparameters- the template's parameters as resolved at create, in the template's order; empty for a template without any
parameters[].mutableparameters[].nameparameters[].valuepausing- stopping: the stop keeps the session, which becomes paused once its checkpoint is stored
phase- One of
creating,placing,syncing,preparing,starting,ready policy- the policy version the session started with and what it allows
policy.clipboard- One of
allow,deny policy.download- One of
allow,deny policy.lifecycle- the limits the session started under
policy.lifecycle.auto_stop- what an idle stop, the budget's hard stop and max_lifetime_secs do to a cloud-writer session: pause keeps it with its checkpoint for dev.sessions.start, end ends it; a local writer always endsOne of
pause,end policy.lifecycle.idle_max_secs- at least idle_min_secs; idle_secs and a person's idle_secs lie between; a template that names an idle over it is refused at dev.sessions.up (422 template_invalid, finding idle_over_policy with its next), the 60 min default is pulled down
policy.lifecycle.idle_min_secspolicy.lifecycle.idle_secs- the idle stop when the person names none; null is the template's (60 min unless it says)
policy.lifecycle.lifetime_warning_secs- shorter than max_lifetime_secs
policy.lifecycle.max_lifetime_secs- from create to stop, whatever the activity; null, the default, is no limit; ciresk dev policy preset no-local-checkout suggests 86400
policy.lifecycle.max_session_cpus_milli- the largest cpu reservation, in thousandths of a cpu; null is the worker's own limit (422 session_too_large)
policy.lifecycle.max_session_memory_bytes- the largest memory reservation one template may declare; null is the worker's own limit (422 session_too_large)
policy.lifecycle.sessions_per_org- live sessions of the organisation, never above the installation's own ceiling (409 org_session_limit)
policy.lifecycle.sessions_per_person- live sessions one person and their agents hold; at most sessions_per_org (409 person_session_limit)
policy.local_sync- One of
allow,deny policy.port_forward- One of
allow,deny policy.sharing- One of
false,view,use policy.ssh- One of
allow,deny policy.ssh_exec- One of
allow,deny policy.upload- One of
allow,deny policy.versionpreset- the preset the session was created with
queuequeue.per_principalqueue.queuedqueue.queued[].clientqueue.queued[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.queued[].op- One of
exec,reset,restart,login,checkpoint queue.queued[].position- 0 while running
queue.queued[].principal- the stream's verified principal
queue.queued[].waiting_msqueue.runningqueue.running[].clientqueue.running[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.running[].op- One of
exec,reset,restart,login,checkpoint queue.running[].position- 0 while running
queue.running[].principal- the stream's verified principal
queue.running[].waiting_msqueue.slotsrefused_pathsrefused_paths.pathsrefused_paths.totalrelay_urlrequesterrequester_agent- the agent that opened the session as records name it: the verified agent and the harness its Ciresk-Agent header named; display only, null for a person acting themselves and for a session opened before
resources- dev.sessions.get only: the session's cpu, memory and disk now, against the template's resources, and one sample a minute for the last hour, oldest first. cpu and memory are the services' metrics together, disk the bytes the session's directory holds; a value the worker does not report is null now and left out of a sample, never 0. the hops now are the session's latency
resources.cpu_milli- thousandths of a cpu
resources.disk_bytesresources.historyresources.history[].atresources.history[].cpu_milliresources.history[].disk_bytesresources.history[].latencyresources.history[].latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec resources.history[].latency[].p50_msresources.history[].memory_bytesresources.limitsresources.limits.cpus_milliresources.limits.disk_bytesresources.limits.memory_bytesresources.limits.memory_max_bytesresources.memory_bytesresources.sampled_atrole- the caller's role; left out for a session dev.sessions.list with scope org shows to an audit reader who is neither its owner nor a memberOne of
owner,use,view rootseedseed.generationseed.rootseed.stale- a path under data.inputs changed since; next: ciresk dev reset --rebuild
seed.taken_atseed.volumesservicesservices[].close_reason- One of
idle,oom,crashed,requested,kill services[].detailservices[].health- ; every non-healthy state carries the exact next command
services[].health.detailservices[].health.nextservices[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop services[].health.state- One of
healthy,degraded,failed services[].metricsservices[].metrics.baseline_rss_bytesservices[].metrics.cache_bytesservices[].metrics.cpu_milliservices[].metrics.fdsservices[].metrics.hmr_p50_msservices[].metrics.inotify_watchesservices[].metrics.io_bytes- bytes the container's processes read and wrote (cgroup io.stat), sampled while it starts
services[].metrics.rss_bytesservices[].metrics.sampled_atservices[].nameservices[].restartsservices[].serving- the generation this service serves
services[].started_at- when the running process started; how long a start or a prepare step has taken
services[].state- One of
waiting,starting,ready,completed,failed,stopped,not_started source- One of
worktree,trunk,branch,checkpoint ssh_host_key- the session's openssh host key line
state- paused: stopped with its checkpoint and kept; dev.sessions.start places it againOne of
pending,starting,ready,degraded,disconnected,lost,stopping,paused,stopped,failed state_reason- why the session is in its state. pending: no_capacity, worker_starting or no_worker, or agent_exit_unavailable while no worker that runs the agent's own exit asks for it; lost: worker_lost; stopping, paused and stopped: requested, idle, max_lifetime, budget, kill, access_changed, recreated, checkpoint_expired (a paused session's checkpoint expired, dev), or stopped when the holder stopped with no reason; failed: the worker's failure code, template_digest_mismatch, start_failed, services_failed or an infrastructure code such as disk_full or toolchain_unavailable. a service that never gets ready leaves the session degraded with no reason (
ciresk dev upanswers the CLI error service_not_ready) switchswitch.fromswitch.phase- One of
applying,preparing,restarting switch.totemplatetemplate_digesttimings- milliseconds from create, derived from the session's events
timings.create_mstimings.lease_mstimings.prepare_mstimings.ready_mstimings.sync_mstree_idunpushed_files- writer cloud: files changed since the trunk tree, until forge pushes them
view- whether the session's view hides any path; never which
view.policy_versionview.restrictedweb_gateway- dev.sessions.get only: whether the installation serves sessions in the browser (a preview domain is configured); the console offers no browser button without it
weightweight.cpus_milliweight.disk_bytesweight.memory_bytesweight.memory_max_bytesworkerworker_release- the release the holding worker registered with (its software_version label), so a rollout is visible
workers- only on a pending session whose state_reason is no_worker because the organisation runs on its own workers: nothing of the cell starts one, so a client says to start one of the organisation's enrolled workers; absent otherwiseOne of
customer workspaceworkspace.bytes_materialisedworkspace.files_materialisedworkspace.files_totalworkspace.recent_waitsworkspace.wait_p95_msworkspace.waits_last_minwriter- One of
local,cloud
Errors
- 401an error
- 402product_not_licensed, licence_not_yet_valid, licence_expired, licence_ceiling_reached: the licence port refuses new work for the organisation (product dev, next: the platform console's billing page); during CIRESK_DEV_LICENSE_GRACE_UNTIL an organisation without a dev plan is not refused, and an organisation's live session is always returned
- 403not_allowed: this worktree's session has another owner, or source checkpoint names a session the caller does not own (no id, no hint); budget_exceeded: the policy's budget.person_day_units or budget.org_month_units has less than 5 minutes of this session left (scope person_day or org_month, limit_units, used_units, resets_at, next: ciresk dev usage); template_not_published: the policy's templates is published and this template name and dev-file digest are not the active version of the most specific promotion for the repository, or a remote session names a template with no version promoted for its repository, under any policy (next: ciresk dev templates publish <template>; promoted {version_id, template_digest, repository} when another version is active); policy_local_sync_denied: the organisation's policy local_sync is deny and the request syncs a worktree (no source, or source worktree), next: ciresk dev up --remote <template>
- 409writer_conflict (members holder), template_mismatch, org_session_limit and person_session_limit (the policy's lifecycle.sessions_per_org and sessions_per_person, with limit and next: ciresk dev status --all), no_checkpoint (from_session is still running, was killed, is not a cloud writer or has no last checkpoint), already_resumed (another session resumed from_session already; resumed_by names it, dev), org_erasing (the organisation's dev data is being erased), parameter_immutable (the live session runs another value of an immutable parameter the request names; parameters lists them, next: ciresk dev up --recreate), parameters_changed (only mutable parameters the request names differ; parameters lists them, next: ciresk dev up --recreate)
- 422template_invalid (members findings; idle_over_policy when the template's idle is over the policy's lifecycle.idle_max_secs), egress_denied (denied lists the refused host:port, a row with no ports on 443; reason vendor: a required row names a model or tool vendor, an ip literal or a wildcard that may reach one, where an optional one is dropped; reason org_policy: the organisation's egress.session does not cover a required row, next: ciresk dev policy show; reason agent_policy: the same for egress.agent in a session an agent principal starts, where unset is empty; no reason: the installation's egress.yaml does not allow it for product dev-session, the product the worker's session proxy decides under, so a required row passes only where that proxy lets it out; and its amendment of 2026-10-25), template_file_missing (a remote session's promoted version was published before dev-api kept the dev file; next: ciresk dev templates publish <template>), idle_out_of_bounds (idle_secs outside the policy's lifecycle.idle_min_secs and idle_max_secs, both in the problem, next: ciresk dev policy show), session_too_large (the template's memory or cpu reservation over lifecycle.max_session_memory_bytes or max_session_cpus_milli), branch_not_in_ci (source branch: ci has no finished run on a tree for that repository and ref, a delta-only run does not count; next: ciresk ci run check), pull_secret_not_granted (a service's pull.secret is not among the organisation's secrets granted to this session, secret names it; next: ciresk dev secrets set <name> with the registry among its hosts), parameter_invalid (members findings: a preset or parameter the template does not declare, or a value its type refuses, each with its path)
- 503licence_unavailable: the licence source does not answer and the organisation's last answer is a day old, after the grace (retry_after); cell_session_limit: the cell runs its ceiling of live sessions across organisations (CIRESK_DEV_CELL_SESSION_LIMIT), with limit, retry_after_ms and next; source branch only: ci_not_configured (this installation's dev api has no ci cell), ci_unavailable (the ci cell could not be asked about the branch; retry with backoff)
curl -X POST "$CIRESK_API/v1/dev/sessions" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Content-Type: application/json" \
-d '{
"branch": "main",
"device_public_key": "q3Vt1kYwZ8Xo2Jc9bN4rTe7LmA0sPfHgD6iUyW5xCzE",
"from_session": "devs_010ed7b2679423d5eda5b2b4e02174ec",
"head": "1d6ccb175d0e4a3b2c1f0e9d8c7b6a5f4e3d2c1b",
"idle_secs": 300,
"label": "platform",
"lazy": true,
"local_ports": {
"localPort": 1024
},
"parameters": {
"parameter": "acme/platform"
},
"prepare_locks": {
"prepareLock": "2602afaaecd31208ada64363754ff2adf596000cfec12783e956827e801a6d7a"
},
"preset": "acme/platform",
"recreate": true,
"remote_fingerprint": "4f70c8f0c595cdb244806cccd40abaaaccf391a95af284c4626f4a07c0480375",
"root": "sha256:c84bb01b3416e3c69da05fc82e4724303b8f043e9aa76f4bb4fc92d3e729fd96",
"source": "worktree",
"template": "platform",
"template_b64": "dmVyc2lvbjogMQp0ZW1wbGF0ZXM6CiAgcGxhdGZvcm06IHt9Cg==",
"template_digest": "sha256:594a7fce866c492eace239ff639d9cc6cec7df777c152af6729dbae01dba6e91",
"template_path": ".ciresk/dev.yaml",
"tree_id": "b0cdf1fc30be0ff6e8f6c025dd6412bae89c5871145de677868dd394e8e7510a",
"writer": "local"
}'Get a session
Read a session, optionally waiting for a state.
The owner, or a member with a live grant, else 403 not_allowed; a member's answer carries its role. With wait_for, a long-poll that answers as soon as the session reaches that state (leased: any state after the claim) or a terminal one, or at timeout_s with the current state (never longer than 25 s). With wait_for=leased and the Ciresk-Device-Key, Ciresk-Device-Signature and Ciresk-Device-Signed-At headers of a granted device whose signature verifies, the answer carries a ticket for the current epoch, so the creating client can connect and push the first tree; without them, no ticket.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
wait_for | string | Optional | leased: any state after the claim (with a ticket); ready; serving: every running workspace service serves gen, or reports an error or a warning for it (on-demand services that are not running are left out) |
gen | integer | Optional | the generation for wait_for=serving |
timeout_s | integer | Optional | |
Ciresk-Device-Key | string | Optional | ed25519 public key, base64url |
Ciresk-Device-Signature | string | Optional | ed25519 over dev-ticket:<session>:<signed_at>; without it no ticket is returned |
Ciresk-Device-Signed-At | integer | Optional | unix seconds, within 60 s |
Ciresk-Tunnel | string | Optional | the tunnel protocol the client speaks. With 2, the ticket is keyed (its signed claims carry tunnel_pin, the worker's per-epoch certificate pin) when the installation turned end to end on, the session's worker reported its pin for the epoch and every polling relay announced v2; a keyed ticket's streams are TLS 1.3 end to end and the worker refuses a v1 open on it. Absent or 1: an unkeyed ticket |
Response
branchclientsclients[].client- the daemon's label: mcp:<pid>, cli, browser
clients[].open_streamsclients[].serviceclients[].streams_last_minclients[].waiting- streams held while the service is not ready
created_atdiagnostic_counts- per service; the records come through the diagnostics stream
diagnostic_counts[].digest- over a salt only the worker holds and the records: changes when they do
diagnostic_counts[].errorsdiagnostic_counts[].generationdiagnostic_counts[].servicediagnostic_counts[].warningsdotfiles- the owner's dotfiles as dev up decided them; null when the owner set none
dotfiles.detaildotfiles.nextdotfiles.reason- One of
policy_off,host_not_allowed,vendor,egress_ceiling,egress_denied,agent_session dotfiles.repodotfiles.state- One of
granted,skipped,unset epochexpires_at- while live: the stop of the policy's lifecycle.max_lifetime_secs, whatever the activity, fixed at create and at a start; null is no limit. paused: when its checkpoint expires and the session ends
exposeexpose[].kind- internal: reached only by worker-side services through the guest; never bound locally, never a tunnel stream or an SSH forwardOne of
http,tcp,internal expose[].nameexpose[].portexpose[].targetfrom_session- source checkpoint: the lost session this one resumed
generationhealth- the worst service's
health.detailhealth.nexthealth.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop health.state- One of
healthy,degraded,failed ididle_expires_atlabellast_activity_atlast_checkpoint_at- writer cloud: the last checkpoint, so a person sees what a lost host could cost
last_push- dev.sessions.get, writer cloud: the newest push to the session's branch; absent before the first
last_push.atlast_push.change_request_urllast_push.new- the commit it pushed
last_push.referencelatencylatency[].at- added by the cli when it merges the daemon's hopsOne of
worker,this_machine latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec latency[].last_mslatency[].overlatency[].p50_mslatency[].p95_mslatency[].sampleslatency[].target_msneeds_open- needs nobody answered or dismissed yet: the session needs its person (dev.sessions.needs.list)
ownerparameters- the template's parameters as resolved at create, in the template's order; empty for a template without any
parameters[].mutableparameters[].nameparameters[].valuepausing- stopping: the stop keeps the session, which becomes paused once its checkpoint is stored
phase- One of
creating,placing,syncing,preparing,starting,ready policy- the policy version the session started with and what it allows
policy.clipboard- One of
allow,deny policy.download- One of
allow,deny policy.lifecycle- the limits the session started under
policy.lifecycle.auto_stop- what an idle stop, the budget's hard stop and max_lifetime_secs do to a cloud-writer session: pause keeps it with its checkpoint for dev.sessions.start, end ends it; a local writer always endsOne of
pause,end policy.lifecycle.idle_max_secs- at least idle_min_secs; idle_secs and a person's idle_secs lie between; a template that names an idle over it is refused at dev.sessions.up (422 template_invalid, finding idle_over_policy with its next), the 60 min default is pulled down
policy.lifecycle.idle_min_secspolicy.lifecycle.idle_secs- the idle stop when the person names none; null is the template's (60 min unless it says)
policy.lifecycle.lifetime_warning_secs- shorter than max_lifetime_secs
policy.lifecycle.max_lifetime_secs- from create to stop, whatever the activity; null, the default, is no limit; ciresk dev policy preset no-local-checkout suggests 86400
policy.lifecycle.max_session_cpus_milli- the largest cpu reservation, in thousandths of a cpu; null is the worker's own limit (422 session_too_large)
policy.lifecycle.max_session_memory_bytes- the largest memory reservation one template may declare; null is the worker's own limit (422 session_too_large)
policy.lifecycle.sessions_per_org- live sessions of the organisation, never above the installation's own ceiling (409 org_session_limit)
policy.lifecycle.sessions_per_person- live sessions one person and their agents hold; at most sessions_per_org (409 person_session_limit)
policy.local_sync- One of
allow,deny policy.port_forward- One of
allow,deny policy.sharing- One of
false,view,use policy.ssh- One of
allow,deny policy.ssh_exec- One of
allow,deny policy.upload- One of
allow,deny policy.versionpreset- the preset the session was created with
queuequeue.per_principalqueue.queuedqueue.queued[].clientqueue.queued[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.queued[].op- One of
exec,reset,restart,login,checkpoint queue.queued[].position- 0 while running
queue.queued[].principal- the stream's verified principal
queue.queued[].waiting_msqueue.runningqueue.running[].clientqueue.running[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.running[].op- One of
exec,reset,restart,login,checkpoint queue.running[].position- 0 while running
queue.running[].principal- the stream's verified principal
queue.running[].waiting_msqueue.slotsrefused_pathsrefused_paths.pathsrefused_paths.totalrelay_urlrequesterrequester_agent- the agent that opened the session as records name it: the verified agent and the harness its Ciresk-Agent header named; display only, null for a person acting themselves and for a session opened before
resources- dev.sessions.get only: the session's cpu, memory and disk now, against the template's resources, and one sample a minute for the last hour, oldest first. cpu and memory are the services' metrics together, disk the bytes the session's directory holds; a value the worker does not report is null now and left out of a sample, never 0. the hops now are the session's latency
resources.cpu_milli- thousandths of a cpu
resources.disk_bytesresources.historyresources.history[].atresources.history[].cpu_milliresources.history[].disk_bytesresources.history[].latencyresources.history[].latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec resources.history[].latency[].p50_msresources.history[].memory_bytesresources.limitsresources.limits.cpus_milliresources.limits.disk_bytesresources.limits.memory_bytesresources.limits.memory_max_bytesresources.memory_bytesresources.sampled_atrole- the caller's role; left out for a session dev.sessions.list with scope org shows to an audit reader who is neither its owner nor a memberOne of
owner,use,view rootseedseed.generationseed.rootseed.stale- a path under data.inputs changed since; next: ciresk dev reset --rebuild
seed.taken_atseed.volumesservicesservices[].close_reason- One of
idle,oom,crashed,requested,kill services[].detailservices[].health- ; every non-healthy state carries the exact next command
services[].health.detailservices[].health.nextservices[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop services[].health.state- One of
healthy,degraded,failed services[].metricsservices[].metrics.baseline_rss_bytesservices[].metrics.cache_bytesservices[].metrics.cpu_milliservices[].metrics.fdsservices[].metrics.hmr_p50_msservices[].metrics.inotify_watchesservices[].metrics.io_bytes- bytes the container's processes read and wrote (cgroup io.stat), sampled while it starts
services[].metrics.rss_bytesservices[].metrics.sampled_atservices[].nameservices[].restartsservices[].serving- the generation this service serves
services[].started_at- when the running process started; how long a start or a prepare step has taken
services[].state- One of
waiting,starting,ready,completed,failed,stopped,not_started source- One of
worktree,trunk,branch,checkpoint ssh_host_key- the session's openssh host key line
state- paused: stopped with its checkpoint and kept; dev.sessions.start places it againOne of
pending,starting,ready,degraded,disconnected,lost,stopping,paused,stopped,failed state_reason- why the session is in its state. pending: no_capacity, worker_starting or no_worker, or agent_exit_unavailable while no worker that runs the agent's own exit asks for it; lost: worker_lost; stopping, paused and stopped: requested, idle, max_lifetime, budget, kill, access_changed, recreated, checkpoint_expired (a paused session's checkpoint expired, dev), or stopped when the holder stopped with no reason; failed: the worker's failure code, template_digest_mismatch, start_failed, services_failed or an infrastructure code such as disk_full or toolchain_unavailable. a service that never gets ready leaves the session degraded with no reason (
ciresk dev upanswers the CLI error service_not_ready) switchswitch.fromswitch.phase- One of
applying,preparing,restarting switch.totemplatetemplate_digesttimings- milliseconds from create, derived from the session's events
timings.create_mstimings.lease_mstimings.prepare_mstimings.ready_mstimings.sync_mstree_idunpushed_files- writer cloud: files changed since the trunk tree, until forge pushes them
view- whether the session's view hides any path; never which
view.policy_versionview.restrictedweb_gateway- dev.sessions.get only: whether the installation serves sessions in the browser (a preview domain is configured); the console offers no browser button without it
weightweight.cpus_milliweight.disk_bytesweight.memory_bytesweight.memory_max_bytesworkerworker_release- the release the holding worker registered with (its software_version label), so a rollout is visible
workers- only on a pending session whose state_reason is no_worker because the organisation runs on its own workers: nothing of the cell starts one, so a client says to start one of the organisation's enrolled workers; absent otherwiseOne of
customer workspaceworkspace.bytes_materialisedworkspace.files_materialisedworkspace.files_totalworkspace.recent_waitsworkspace.wait_p95_msworkspace.waits_last_minwriter- One of
local,cloud ticket- a dev-api-signed assertion (ed25519, kid), at most 30 s, renewed every 20 s with the credential, owner and grant re-checked; verified by the relay and again by the worker per stream
ticket.epochticket.expires_atticket.kinds- stream kinds and capabilities, minted from the caller's role and the policy
ticket.relay_urlticket.ssh_host_key- the epoch's openssh host key once the worker reported it; a renewal refreshes known_hosts
ticket.sync- true only for the creating device
ticket.ticketticket.ticket_id
Errors
- 404an error
curl "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f" \
-H "Authorization: Bearer $CIRESK_KEY"Update a session
Move the session's branch (and its writer row) or change its idle ttl.
Owner only (the caller's accountable person must be the session's owner, else 403 not_allowed).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
Request body
branchidle_secs- within the current policy's lifecycle bounds (422 idle_out_of_bounds)
Response
branchclientsclients[].client- the daemon's label: mcp:<pid>, cli, browser
clients[].open_streamsclients[].serviceclients[].streams_last_minclients[].waiting- streams held while the service is not ready
created_atdiagnostic_counts- per service; the records come through the diagnostics stream
diagnostic_counts[].digest- over a salt only the worker holds and the records: changes when they do
diagnostic_counts[].errorsdiagnostic_counts[].generationdiagnostic_counts[].servicediagnostic_counts[].warningsdotfiles- the owner's dotfiles as dev up decided them; null when the owner set none
dotfiles.detaildotfiles.nextdotfiles.reason- One of
policy_off,host_not_allowed,vendor,egress_ceiling,egress_denied,agent_session dotfiles.repodotfiles.state- One of
granted,skipped,unset epochexpires_at- while live: the stop of the policy's lifecycle.max_lifetime_secs, whatever the activity, fixed at create and at a start; null is no limit. paused: when its checkpoint expires and the session ends
exposeexpose[].kind- internal: reached only by worker-side services through the guest; never bound locally, never a tunnel stream or an SSH forwardOne of
http,tcp,internal expose[].nameexpose[].portexpose[].targetfrom_session- source checkpoint: the lost session this one resumed
generationhealth- the worst service's
health.detailhealth.nexthealth.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop health.state- One of
healthy,degraded,failed ididle_expires_atlabellast_activity_atlast_checkpoint_at- writer cloud: the last checkpoint, so a person sees what a lost host could cost
last_push- dev.sessions.get, writer cloud: the newest push to the session's branch; absent before the first
last_push.atlast_push.change_request_urllast_push.new- the commit it pushed
last_push.referencelatencylatency[].at- added by the cli when it merges the daemon's hopsOne of
worker,this_machine latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec latency[].last_mslatency[].overlatency[].p50_mslatency[].p95_mslatency[].sampleslatency[].target_msneeds_open- needs nobody answered or dismissed yet: the session needs its person (dev.sessions.needs.list)
ownerparameters- the template's parameters as resolved at create, in the template's order; empty for a template without any
parameters[].mutableparameters[].nameparameters[].valuepausing- stopping: the stop keeps the session, which becomes paused once its checkpoint is stored
phase- One of
creating,placing,syncing,preparing,starting,ready policy- the policy version the session started with and what it allows
policy.clipboard- One of
allow,deny policy.download- One of
allow,deny policy.lifecycle- the limits the session started under
policy.lifecycle.auto_stop- what an idle stop, the budget's hard stop and max_lifetime_secs do to a cloud-writer session: pause keeps it with its checkpoint for dev.sessions.start, end ends it; a local writer always endsOne of
pause,end policy.lifecycle.idle_max_secs- at least idle_min_secs; idle_secs and a person's idle_secs lie between; a template that names an idle over it is refused at dev.sessions.up (422 template_invalid, finding idle_over_policy with its next), the 60 min default is pulled down
policy.lifecycle.idle_min_secspolicy.lifecycle.idle_secs- the idle stop when the person names none; null is the template's (60 min unless it says)
policy.lifecycle.lifetime_warning_secs- shorter than max_lifetime_secs
policy.lifecycle.max_lifetime_secs- from create to stop, whatever the activity; null, the default, is no limit; ciresk dev policy preset no-local-checkout suggests 86400
policy.lifecycle.max_session_cpus_milli- the largest cpu reservation, in thousandths of a cpu; null is the worker's own limit (422 session_too_large)
policy.lifecycle.max_session_memory_bytes- the largest memory reservation one template may declare; null is the worker's own limit (422 session_too_large)
policy.lifecycle.sessions_per_org- live sessions of the organisation, never above the installation's own ceiling (409 org_session_limit)
policy.lifecycle.sessions_per_person- live sessions one person and their agents hold; at most sessions_per_org (409 person_session_limit)
policy.local_sync- One of
allow,deny policy.port_forward- One of
allow,deny policy.sharing- One of
false,view,use policy.ssh- One of
allow,deny policy.ssh_exec- One of
allow,deny policy.upload- One of
allow,deny policy.versionpreset- the preset the session was created with
queuequeue.per_principalqueue.queuedqueue.queued[].clientqueue.queued[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.queued[].op- One of
exec,reset,restart,login,checkpoint queue.queued[].position- 0 while running
queue.queued[].principal- the stream's verified principal
queue.queued[].waiting_msqueue.runningqueue.running[].clientqueue.running[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.running[].op- One of
exec,reset,restart,login,checkpoint queue.running[].position- 0 while running
queue.running[].principal- the stream's verified principal
queue.running[].waiting_msqueue.slotsrefused_pathsrefused_paths.pathsrefused_paths.totalrelay_urlrequesterrequester_agent- the agent that opened the session as records name it: the verified agent and the harness its Ciresk-Agent header named; display only, null for a person acting themselves and for a session opened before
resources- dev.sessions.get only: the session's cpu, memory and disk now, against the template's resources, and one sample a minute for the last hour, oldest first. cpu and memory are the services' metrics together, disk the bytes the session's directory holds; a value the worker does not report is null now and left out of a sample, never 0. the hops now are the session's latency
resources.cpu_milli- thousandths of a cpu
resources.disk_bytesresources.historyresources.history[].atresources.history[].cpu_milliresources.history[].disk_bytesresources.history[].latencyresources.history[].latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec resources.history[].latency[].p50_msresources.history[].memory_bytesresources.limitsresources.limits.cpus_milliresources.limits.disk_bytesresources.limits.memory_bytesresources.limits.memory_max_bytesresources.memory_bytesresources.sampled_atrole- the caller's role; left out for a session dev.sessions.list with scope org shows to an audit reader who is neither its owner nor a memberOne of
owner,use,view rootseedseed.generationseed.rootseed.stale- a path under data.inputs changed since; next: ciresk dev reset --rebuild
seed.taken_atseed.volumesservicesservices[].close_reason- One of
idle,oom,crashed,requested,kill services[].detailservices[].health- ; every non-healthy state carries the exact next command
services[].health.detailservices[].health.nextservices[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop services[].health.state- One of
healthy,degraded,failed services[].metricsservices[].metrics.baseline_rss_bytesservices[].metrics.cache_bytesservices[].metrics.cpu_milliservices[].metrics.fdsservices[].metrics.hmr_p50_msservices[].metrics.inotify_watchesservices[].metrics.io_bytes- bytes the container's processes read and wrote (cgroup io.stat), sampled while it starts
services[].metrics.rss_bytesservices[].metrics.sampled_atservices[].nameservices[].restartsservices[].serving- the generation this service serves
services[].started_at- when the running process started; how long a start or a prepare step has taken
services[].state- One of
waiting,starting,ready,completed,failed,stopped,not_started source- One of
worktree,trunk,branch,checkpoint ssh_host_key- the session's openssh host key line
state- paused: stopped with its checkpoint and kept; dev.sessions.start places it againOne of
pending,starting,ready,degraded,disconnected,lost,stopping,paused,stopped,failed state_reason- why the session is in its state. pending: no_capacity, worker_starting or no_worker, or agent_exit_unavailable while no worker that runs the agent's own exit asks for it; lost: worker_lost; stopping, paused and stopped: requested, idle, max_lifetime, budget, kill, access_changed, recreated, checkpoint_expired (a paused session's checkpoint expired, dev), or stopped when the holder stopped with no reason; failed: the worker's failure code, template_digest_mismatch, start_failed, services_failed or an infrastructure code such as disk_full or toolchain_unavailable. a service that never gets ready leaves the session degraded with no reason (
ciresk dev upanswers the CLI error service_not_ready) switchswitch.fromswitch.phase- One of
applying,preparing,restarting switch.totemplatetemplate_digesttimings- milliseconds from create, derived from the session's events
timings.create_mstimings.lease_mstimings.prepare_mstimings.ready_mstimings.sync_mstree_idunpushed_files- writer cloud: files changed since the trunk tree, until forge pushes them
view- whether the session's view hides any path; never which
view.policy_versionview.restrictedweb_gateway- dev.sessions.get only: whether the installation serves sessions in the browser (a preview domain is configured); the console offers no browser button without it
weightweight.cpus_milliweight.disk_bytesweight.memory_bytesweight.memory_max_bytesworkerworker_release- the release the holding worker registered with (its software_version label), so a rollout is visible
workers- only on a pending session whose state_reason is no_worker because the organisation runs on its own workers: nothing of the cell starts one, so a client says to start one of the organisation's enrolled workers; absent otherwiseOne of
customer workspaceworkspace.bytes_materialisedworkspace.files_materialisedworkspace.files_totalworkspace.recent_waitsworkspace.wait_p95_msworkspace.waits_last_minwriter- One of
local,cloud
curl -X PATCH "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Content-Type: application/json" \
-d '{
"branch": "main",
"idle_secs": 300
}'Read a session's events
The session's journal, oldest first; with follow, a long-poll for people and agents following along.
Owner and members, else 403 not_allowed. With follow=true the call waits up to timeout_s for an event after since (woken per 250 ms window, never per append, decision 4).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
since | integer | Optional | return events with seq greater than this |
follow | boolean | Optional | |
timeout_s | integer | Optional | |
tunnel | integer | Optional | the tunnel protocol the polling relay forwards; 2 announces v2 opens, and dev-api keys tickets only while every relay polling in the last 2 min announced it |
limit | integer | Optional |
Response
datadata[].actordata[].atdata[].class- One of
inbound,run data[].epochdata[].kind- session.lifetime_warning is only in journals from before need.raised {kind: expiring} replaced itOne of
session.created,session.stop_requested,session.killed,writer.moved,grant.added,grant.revoked,session.leased,session.disconnected,session.reconnected,session.lost,service.changed,service.serving,service.diagnostics,service.health,service.restarted,session.ready,session.degraded,session.applied,identity.logged_in,identity.revoked,session.stopped,session.failed,member.added,member.revokedand 27 more data[].payloaddata[].schema_versiondata[].seqdata[].session_iddata[].worker_seqhas_morenext_cursor
curl "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/events" \
-H "Authorization: Bearer $CIRESK_KEY"Pause a session
Stop a cloud-writer session and keep it, its checkpoint durable first, compute released.
Owner only (403 not_allowed). A placed session goes to stopping with pausing true; its worker freezes and checkpoints the workspace into the org's store before it removes the pod, and the session is paused once that checkpoint is its last_checkpoint (session.paused). A pending or lost one is paused at once on the checkpoint it has. A paused or pausing one answers itself. A paused session keeps its id, members, needs, journal and its branch's writer row, reserves no usage and counts against no live-session limit; it ends with state_reason checkpoint_expired 30 days after its create unless started (an expiring need first).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
Idempotency-Key | string | Optional | makes a retried call act once (every mutating MCP tool sends one) |
Request body
reason
Response
branchclientsclients[].client- the daemon's label: mcp:<pid>, cli, browser
clients[].open_streamsclients[].serviceclients[].streams_last_minclients[].waiting- streams held while the service is not ready
created_atdiagnostic_counts- per service; the records come through the diagnostics stream
diagnostic_counts[].digest- over a salt only the worker holds and the records: changes when they do
diagnostic_counts[].errorsdiagnostic_counts[].generationdiagnostic_counts[].servicediagnostic_counts[].warningsdotfiles- the owner's dotfiles as dev up decided them; null when the owner set none
dotfiles.detaildotfiles.nextdotfiles.reason- One of
policy_off,host_not_allowed,vendor,egress_ceiling,egress_denied,agent_session dotfiles.repodotfiles.state- One of
granted,skipped,unset epochexpires_at- while live: the stop of the policy's lifecycle.max_lifetime_secs, whatever the activity, fixed at create and at a start; null is no limit. paused: when its checkpoint expires and the session ends
exposeexpose[].kind- internal: reached only by worker-side services through the guest; never bound locally, never a tunnel stream or an SSH forwardOne of
http,tcp,internal expose[].nameexpose[].portexpose[].targetfrom_session- source checkpoint: the lost session this one resumed
generationhealth- the worst service's
health.detailhealth.nexthealth.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop health.state- One of
healthy,degraded,failed ididle_expires_atlabellast_activity_atlast_checkpoint_at- writer cloud: the last checkpoint, so a person sees what a lost host could cost
last_push- dev.sessions.get, writer cloud: the newest push to the session's branch; absent before the first
last_push.atlast_push.change_request_urllast_push.new- the commit it pushed
last_push.referencelatencylatency[].at- added by the cli when it merges the daemon's hopsOne of
worker,this_machine latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec latency[].last_mslatency[].overlatency[].p50_mslatency[].p95_mslatency[].sampleslatency[].target_msneeds_open- needs nobody answered or dismissed yet: the session needs its person (dev.sessions.needs.list)
ownerparameters- the template's parameters as resolved at create, in the template's order; empty for a template without any
parameters[].mutableparameters[].nameparameters[].valuepausing- stopping: the stop keeps the session, which becomes paused once its checkpoint is stored
phase- One of
creating,placing,syncing,preparing,starting,ready policy- the policy version the session started with and what it allows
policy.clipboard- One of
allow,deny policy.download- One of
allow,deny policy.lifecycle- the limits the session started under
policy.lifecycle.auto_stop- what an idle stop, the budget's hard stop and max_lifetime_secs do to a cloud-writer session: pause keeps it with its checkpoint for dev.sessions.start, end ends it; a local writer always endsOne of
pause,end policy.lifecycle.idle_max_secs- at least idle_min_secs; idle_secs and a person's idle_secs lie between; a template that names an idle over it is refused at dev.sessions.up (422 template_invalid, finding idle_over_policy with its next), the 60 min default is pulled down
policy.lifecycle.idle_min_secspolicy.lifecycle.idle_secs- the idle stop when the person names none; null is the template's (60 min unless it says)
policy.lifecycle.lifetime_warning_secs- shorter than max_lifetime_secs
policy.lifecycle.max_lifetime_secs- from create to stop, whatever the activity; null, the default, is no limit; ciresk dev policy preset no-local-checkout suggests 86400
policy.lifecycle.max_session_cpus_milli- the largest cpu reservation, in thousandths of a cpu; null is the worker's own limit (422 session_too_large)
policy.lifecycle.max_session_memory_bytes- the largest memory reservation one template may declare; null is the worker's own limit (422 session_too_large)
policy.lifecycle.sessions_per_org- live sessions of the organisation, never above the installation's own ceiling (409 org_session_limit)
policy.lifecycle.sessions_per_person- live sessions one person and their agents hold; at most sessions_per_org (409 person_session_limit)
policy.local_sync- One of
allow,deny policy.port_forward- One of
allow,deny policy.sharing- One of
false,view,use policy.ssh- One of
allow,deny policy.ssh_exec- One of
allow,deny policy.upload- One of
allow,deny policy.versionpreset- the preset the session was created with
queuequeue.per_principalqueue.queuedqueue.queued[].clientqueue.queued[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.queued[].op- One of
exec,reset,restart,login,checkpoint queue.queued[].position- 0 while running
queue.queued[].principal- the stream's verified principal
queue.queued[].waiting_msqueue.runningqueue.running[].clientqueue.running[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.running[].op- One of
exec,reset,restart,login,checkpoint queue.running[].position- 0 while running
queue.running[].principal- the stream's verified principal
queue.running[].waiting_msqueue.slotsrefused_pathsrefused_paths.pathsrefused_paths.totalrelay_urlrequesterrequester_agent- the agent that opened the session as records name it: the verified agent and the harness its Ciresk-Agent header named; display only, null for a person acting themselves and for a session opened before
resources- dev.sessions.get only: the session's cpu, memory and disk now, against the template's resources, and one sample a minute for the last hour, oldest first. cpu and memory are the services' metrics together, disk the bytes the session's directory holds; a value the worker does not report is null now and left out of a sample, never 0. the hops now are the session's latency
resources.cpu_milli- thousandths of a cpu
resources.disk_bytesresources.historyresources.history[].atresources.history[].cpu_milliresources.history[].disk_bytesresources.history[].latencyresources.history[].latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec resources.history[].latency[].p50_msresources.history[].memory_bytesresources.limitsresources.limits.cpus_milliresources.limits.disk_bytesresources.limits.memory_bytesresources.limits.memory_max_bytesresources.memory_bytesresources.sampled_atrole- the caller's role; left out for a session dev.sessions.list with scope org shows to an audit reader who is neither its owner nor a memberOne of
owner,use,view rootseedseed.generationseed.rootseed.stale- a path under data.inputs changed since; next: ciresk dev reset --rebuild
seed.taken_atseed.volumesservicesservices[].close_reason- One of
idle,oom,crashed,requested,kill services[].detailservices[].health- ; every non-healthy state carries the exact next command
services[].health.detailservices[].health.nextservices[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop services[].health.state- One of
healthy,degraded,failed services[].metricsservices[].metrics.baseline_rss_bytesservices[].metrics.cache_bytesservices[].metrics.cpu_milliservices[].metrics.fdsservices[].metrics.hmr_p50_msservices[].metrics.inotify_watchesservices[].metrics.io_bytes- bytes the container's processes read and wrote (cgroup io.stat), sampled while it starts
services[].metrics.rss_bytesservices[].metrics.sampled_atservices[].nameservices[].restartsservices[].serving- the generation this service serves
services[].started_at- when the running process started; how long a start or a prepare step has taken
services[].state- One of
waiting,starting,ready,completed,failed,stopped,not_started source- One of
worktree,trunk,branch,checkpoint ssh_host_key- the session's openssh host key line
state- paused: stopped with its checkpoint and kept; dev.sessions.start places it againOne of
pending,starting,ready,degraded,disconnected,lost,stopping,paused,stopped,failed state_reason- why the session is in its state. pending: no_capacity, worker_starting or no_worker, or agent_exit_unavailable while no worker that runs the agent's own exit asks for it; lost: worker_lost; stopping, paused and stopped: requested, idle, max_lifetime, budget, kill, access_changed, recreated, checkpoint_expired (a paused session's checkpoint expired, dev), or stopped when the holder stopped with no reason; failed: the worker's failure code, template_digest_mismatch, start_failed, services_failed or an infrastructure code such as disk_full or toolchain_unavailable. a service that never gets ready leaves the session degraded with no reason (
ciresk dev upanswers the CLI error service_not_ready) switchswitch.fromswitch.phase- One of
applying,preparing,restarting switch.totemplatetemplate_digesttimings- milliseconds from create, derived from the session's events
timings.create_mstimings.lease_mstimings.prepare_mstimings.ready_mstimings.sync_mstree_idunpushed_files- writer cloud: files changed since the trunk tree, until forge pushes them
view- whether the session's view hides any path; never which
view.policy_versionview.restrictedweb_gateway- dev.sessions.get only: whether the installation serves sessions in the browser (a preview domain is configured); the console offers no browser button without it
weightweight.cpus_milliweight.disk_bytesweight.memory_bytesweight.memory_max_bytesworkerworker_release- the release the holding worker registered with (its software_version label), so a rollout is visible
workers- only on a pending session whose state_reason is no_worker because the organisation runs on its own workers: nothing of the cell starts one, so a client says to start one of the organisation's enrolled workers; absent otherwiseOne of
customer workspaceworkspace.bytes_materialisedworkspace.files_materialisedworkspace.files_totalworkspace.recent_waitsworkspace.wait_p95_msworkspace.waits_last_minwriter- One of
local,cloud
curl -X POST "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/pause" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Idempotency-Key: 559233b2-bb2b-4010-aa82-7fbb7677d062" \
-H "Content-Type: application/json" \
-d '{
"reason": "idle"
}'Start a paused session
Start a paused session again from its last checkpoint, at the next epoch.
Owner only (403 not_allowed). Admitted like a create: the licence, the live-session limits, the cell's envelope and the budget's first slice; under the organisation's policy now, with a fresh expires_at. The session goes to pending; the claim moves its epoch and starts its workspace from last_checkpoint (session.resumed), so every ticket of the earlier epoch is refused. A pending or placed session answers itself.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
Idempotency-Key | string | Optional | makes a retried call act once (every mutating MCP tool sends one) |
Response
branchclientsclients[].client- the daemon's label: mcp:<pid>, cli, browser
clients[].open_streamsclients[].serviceclients[].streams_last_minclients[].waiting- streams held while the service is not ready
created_atdiagnostic_counts- per service; the records come through the diagnostics stream
diagnostic_counts[].digest- over a salt only the worker holds and the records: changes when they do
diagnostic_counts[].errorsdiagnostic_counts[].generationdiagnostic_counts[].servicediagnostic_counts[].warningsdotfiles- the owner's dotfiles as dev up decided them; null when the owner set none
dotfiles.detaildotfiles.nextdotfiles.reason- One of
policy_off,host_not_allowed,vendor,egress_ceiling,egress_denied,agent_session dotfiles.repodotfiles.state- One of
granted,skipped,unset epochexpires_at- while live: the stop of the policy's lifecycle.max_lifetime_secs, whatever the activity, fixed at create and at a start; null is no limit. paused: when its checkpoint expires and the session ends
exposeexpose[].kind- internal: reached only by worker-side services through the guest; never bound locally, never a tunnel stream or an SSH forwardOne of
http,tcp,internal expose[].nameexpose[].portexpose[].targetfrom_session- source checkpoint: the lost session this one resumed
generationhealth- the worst service's
health.detailhealth.nexthealth.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop health.state- One of
healthy,degraded,failed ididle_expires_atlabellast_activity_atlast_checkpoint_at- writer cloud: the last checkpoint, so a person sees what a lost host could cost
last_push- dev.sessions.get, writer cloud: the newest push to the session's branch; absent before the first
last_push.atlast_push.change_request_urllast_push.new- the commit it pushed
last_push.referencelatencylatency[].at- added by the cli when it merges the daemon's hopsOne of
worker,this_machine latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec latency[].last_mslatency[].overlatency[].p50_mslatency[].p95_mslatency[].sampleslatency[].target_msneeds_open- needs nobody answered or dismissed yet: the session needs its person (dev.sessions.needs.list)
ownerparameters- the template's parameters as resolved at create, in the template's order; empty for a template without any
parameters[].mutableparameters[].nameparameters[].valuepausing- stopping: the stop keeps the session, which becomes paused once its checkpoint is stored
phase- One of
creating,placing,syncing,preparing,starting,ready policy- the policy version the session started with and what it allows
policy.clipboard- One of
allow,deny policy.download- One of
allow,deny policy.lifecycle- the limits the session started under
policy.lifecycle.auto_stop- what an idle stop, the budget's hard stop and max_lifetime_secs do to a cloud-writer session: pause keeps it with its checkpoint for dev.sessions.start, end ends it; a local writer always endsOne of
pause,end policy.lifecycle.idle_max_secs- at least idle_min_secs; idle_secs and a person's idle_secs lie between; a template that names an idle over it is refused at dev.sessions.up (422 template_invalid, finding idle_over_policy with its next), the 60 min default is pulled down
policy.lifecycle.idle_min_secspolicy.lifecycle.idle_secs- the idle stop when the person names none; null is the template's (60 min unless it says)
policy.lifecycle.lifetime_warning_secs- shorter than max_lifetime_secs
policy.lifecycle.max_lifetime_secs- from create to stop, whatever the activity; null, the default, is no limit; ciresk dev policy preset no-local-checkout suggests 86400
policy.lifecycle.max_session_cpus_milli- the largest cpu reservation, in thousandths of a cpu; null is the worker's own limit (422 session_too_large)
policy.lifecycle.max_session_memory_bytes- the largest memory reservation one template may declare; null is the worker's own limit (422 session_too_large)
policy.lifecycle.sessions_per_org- live sessions of the organisation, never above the installation's own ceiling (409 org_session_limit)
policy.lifecycle.sessions_per_person- live sessions one person and their agents hold; at most sessions_per_org (409 person_session_limit)
policy.local_sync- One of
allow,deny policy.port_forward- One of
allow,deny policy.sharing- One of
false,view,use policy.ssh- One of
allow,deny policy.ssh_exec- One of
allow,deny policy.upload- One of
allow,deny policy.versionpreset- the preset the session was created with
queuequeue.per_principalqueue.queuedqueue.queued[].clientqueue.queued[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.queued[].op- One of
exec,reset,restart,login,checkpoint queue.queued[].position- 0 while running
queue.queued[].principal- the stream's verified principal
queue.queued[].waiting_msqueue.runningqueue.running[].clientqueue.running[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.running[].op- One of
exec,reset,restart,login,checkpoint queue.running[].position- 0 while running
queue.running[].principal- the stream's verified principal
queue.running[].waiting_msqueue.slotsrefused_pathsrefused_paths.pathsrefused_paths.totalrelay_urlrequesterrequester_agent- the agent that opened the session as records name it: the verified agent and the harness its Ciresk-Agent header named; display only, null for a person acting themselves and for a session opened before
resources- dev.sessions.get only: the session's cpu, memory and disk now, against the template's resources, and one sample a minute for the last hour, oldest first. cpu and memory are the services' metrics together, disk the bytes the session's directory holds; a value the worker does not report is null now and left out of a sample, never 0. the hops now are the session's latency
resources.cpu_milli- thousandths of a cpu
resources.disk_bytesresources.historyresources.history[].atresources.history[].cpu_milliresources.history[].disk_bytesresources.history[].latencyresources.history[].latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec resources.history[].latency[].p50_msresources.history[].memory_bytesresources.limitsresources.limits.cpus_milliresources.limits.disk_bytesresources.limits.memory_bytesresources.limits.memory_max_bytesresources.memory_bytesresources.sampled_atrole- the caller's role; left out for a session dev.sessions.list with scope org shows to an audit reader who is neither its owner nor a memberOne of
owner,use,view rootseedseed.generationseed.rootseed.stale- a path under data.inputs changed since; next: ciresk dev reset --rebuild
seed.taken_atseed.volumesservicesservices[].close_reason- One of
idle,oom,crashed,requested,kill services[].detailservices[].health- ; every non-healthy state carries the exact next command
services[].health.detailservices[].health.nextservices[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop services[].health.state- One of
healthy,degraded,failed services[].metricsservices[].metrics.baseline_rss_bytesservices[].metrics.cache_bytesservices[].metrics.cpu_milliservices[].metrics.fdsservices[].metrics.hmr_p50_msservices[].metrics.inotify_watchesservices[].metrics.io_bytes- bytes the container's processes read and wrote (cgroup io.stat), sampled while it starts
services[].metrics.rss_bytesservices[].metrics.sampled_atservices[].nameservices[].restartsservices[].serving- the generation this service serves
services[].started_at- when the running process started; how long a start or a prepare step has taken
services[].state- One of
waiting,starting,ready,completed,failed,stopped,not_started source- One of
worktree,trunk,branch,checkpoint ssh_host_key- the session's openssh host key line
state- paused: stopped with its checkpoint and kept; dev.sessions.start places it againOne of
pending,starting,ready,degraded,disconnected,lost,stopping,paused,stopped,failed state_reason- why the session is in its state. pending: no_capacity, worker_starting or no_worker, or agent_exit_unavailable while no worker that runs the agent's own exit asks for it; lost: worker_lost; stopping, paused and stopped: requested, idle, max_lifetime, budget, kill, access_changed, recreated, checkpoint_expired (a paused session's checkpoint expired, dev), or stopped when the holder stopped with no reason; failed: the worker's failure code, template_digest_mismatch, start_failed, services_failed or an infrastructure code such as disk_full or toolchain_unavailable. a service that never gets ready leaves the session degraded with no reason (
ciresk dev upanswers the CLI error service_not_ready) switchswitch.fromswitch.phase- One of
applying,preparing,restarting switch.totemplatetemplate_digesttimings- milliseconds from create, derived from the session's events
timings.create_mstimings.lease_mstimings.prepare_mstimings.ready_mstimings.sync_mstree_idunpushed_files- writer cloud: files changed since the trunk tree, until forge pushes them
view- whether the session's view hides any path; never which
view.policy_versionview.restrictedweb_gateway- dev.sessions.get only: whether the installation serves sessions in the browser (a preview domain is configured); the console offers no browser button without it
weightweight.cpus_milliweight.disk_bytesweight.memory_bytesweight.memory_max_bytesworkerworker_release- the release the holding worker registered with (its software_version label), so a rollout is visible
workers- only on a pending session whose state_reason is no_worker because the organisation runs on its own workers: nothing of the cell starts one, so a client says to start one of the organisation's enrolled workers; absent otherwiseOne of
customer workspaceworkspace.bytes_materialisedworkspace.files_materialisedworkspace.files_totalworkspace.recent_waitsworkspace.wait_p95_msworkspace.waits_last_minwriter- One of
local,cloud
Errors
- 402an error
- 403not_allowed, budget_exceeded
- 404an error
- 409not_paused (stopping, stopped or failed), org_session_limit, person_session_limit, org_erasing (the organisation's dev data is being erased)
- 422idempotency_key_reused: the Idempotency-Key answered another request
- 503cell_session_limit: the cell runs its ceiling of live sessions across organisations, with limit, retry_after_ms and next; licence_unavailable: the licence source does not answer and the organisation's last answer is a day old (retry_after)
curl -X POST "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/start" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Idempotency-Key: 7f78b275-6261-4c61-b6a5-e8128c41d627"Stop a session
Stop a session, release its writer row, delete its volumes and upper.
Owner only (the caller's accountable person must be the session's owner, else 403 not_allowed).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
Idempotency-Key | string | Optional | makes a retried call act once (every mutating MCP tool sends one) |
Request body
reason
Response
branchclientsclients[].client- the daemon's label: mcp:<pid>, cli, browser
clients[].open_streamsclients[].serviceclients[].streams_last_minclients[].waiting- streams held while the service is not ready
created_atdiagnostic_counts- per service; the records come through the diagnostics stream
diagnostic_counts[].digest- over a salt only the worker holds and the records: changes when they do
diagnostic_counts[].errorsdiagnostic_counts[].generationdiagnostic_counts[].servicediagnostic_counts[].warningsdotfiles- the owner's dotfiles as dev up decided them; null when the owner set none
dotfiles.detaildotfiles.nextdotfiles.reason- One of
policy_off,host_not_allowed,vendor,egress_ceiling,egress_denied,agent_session dotfiles.repodotfiles.state- One of
granted,skipped,unset epochexpires_at- while live: the stop of the policy's lifecycle.max_lifetime_secs, whatever the activity, fixed at create and at a start; null is no limit. paused: when its checkpoint expires and the session ends
exposeexpose[].kind- internal: reached only by worker-side services through the guest; never bound locally, never a tunnel stream or an SSH forwardOne of
http,tcp,internal expose[].nameexpose[].portexpose[].targetfrom_session- source checkpoint: the lost session this one resumed
generationhealth- the worst service's
health.detailhealth.nexthealth.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop health.state- One of
healthy,degraded,failed ididle_expires_atlabellast_activity_atlast_checkpoint_at- writer cloud: the last checkpoint, so a person sees what a lost host could cost
last_push- dev.sessions.get, writer cloud: the newest push to the session's branch; absent before the first
last_push.atlast_push.change_request_urllast_push.new- the commit it pushed
last_push.referencelatencylatency[].at- added by the cli when it merges the daemon's hopsOne of
worker,this_machine latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec latency[].last_mslatency[].overlatency[].p50_mslatency[].p95_mslatency[].sampleslatency[].target_msneeds_open- needs nobody answered or dismissed yet: the session needs its person (dev.sessions.needs.list)
ownerparameters- the template's parameters as resolved at create, in the template's order; empty for a template without any
parameters[].mutableparameters[].nameparameters[].valuepausing- stopping: the stop keeps the session, which becomes paused once its checkpoint is stored
phase- One of
creating,placing,syncing,preparing,starting,ready policy- the policy version the session started with and what it allows
policy.clipboard- One of
allow,deny policy.download- One of
allow,deny policy.lifecycle- the limits the session started under
policy.lifecycle.auto_stop- what an idle stop, the budget's hard stop and max_lifetime_secs do to a cloud-writer session: pause keeps it with its checkpoint for dev.sessions.start, end ends it; a local writer always endsOne of
pause,end policy.lifecycle.idle_max_secs- at least idle_min_secs; idle_secs and a person's idle_secs lie between; a template that names an idle over it is refused at dev.sessions.up (422 template_invalid, finding idle_over_policy with its next), the 60 min default is pulled down
policy.lifecycle.idle_min_secspolicy.lifecycle.idle_secs- the idle stop when the person names none; null is the template's (60 min unless it says)
policy.lifecycle.lifetime_warning_secs- shorter than max_lifetime_secs
policy.lifecycle.max_lifetime_secs- from create to stop, whatever the activity; null, the default, is no limit; ciresk dev policy preset no-local-checkout suggests 86400
policy.lifecycle.max_session_cpus_milli- the largest cpu reservation, in thousandths of a cpu; null is the worker's own limit (422 session_too_large)
policy.lifecycle.max_session_memory_bytes- the largest memory reservation one template may declare; null is the worker's own limit (422 session_too_large)
policy.lifecycle.sessions_per_org- live sessions of the organisation, never above the installation's own ceiling (409 org_session_limit)
policy.lifecycle.sessions_per_person- live sessions one person and their agents hold; at most sessions_per_org (409 person_session_limit)
policy.local_sync- One of
allow,deny policy.port_forward- One of
allow,deny policy.sharing- One of
false,view,use policy.ssh- One of
allow,deny policy.ssh_exec- One of
allow,deny policy.upload- One of
allow,deny policy.versionpreset- the preset the session was created with
queuequeue.per_principalqueue.queuedqueue.queued[].clientqueue.queued[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.queued[].op- One of
exec,reset,restart,login,checkpoint queue.queued[].position- 0 while running
queue.queued[].principal- the stream's verified principal
queue.queued[].waiting_msqueue.runningqueue.running[].clientqueue.running[].exec_id- a running exec's id, which
dev exec --canceltakes; absent for other operations and while queued queue.running[].op- One of
exec,reset,restart,login,checkpoint queue.running[].position- 0 while running
queue.running[].principal- the stream's verified principal
queue.running[].waiting_msqueue.slotsrefused_pathsrefused_paths.pathsrefused_paths.totalrelay_urlrequesterrequester_agent- the agent that opened the session as records name it: the verified agent and the harness its Ciresk-Agent header named; display only, null for a person acting themselves and for a session opened before
resources- dev.sessions.get only: the session's cpu, memory and disk now, against the template's resources, and one sample a minute for the last hour, oldest first. cpu and memory are the services' metrics together, disk the bytes the session's directory holds; a value the worker does not report is null now and left out of a sample, never 0. the hops now are the session's latency
resources.cpu_milli- thousandths of a cpu
resources.disk_bytesresources.historyresources.history[].atresources.history[].cpu_milliresources.history[].disk_bytesresources.history[].latencyresources.history[].latency[].hop- One of
sync,build,reload,tunnel,browser,fetch,queue,search,exec resources.history[].latency[].p50_msresources.history[].memory_bytesresources.limitsresources.limits.cpus_milliresources.limits.disk_bytesresources.limits.memory_bytesresources.limits.memory_max_bytesresources.memory_bytesresources.sampled_atrole- the caller's role; left out for a session dev.sessions.list with scope org shows to an audit reader who is neither its owner nor a memberOne of
owner,use,view rootseedseed.generationseed.rootseed.stale- a path under data.inputs changed since; next: ciresk dev reset --rebuild
seed.taken_atseed.volumesservicesservices[].close_reason- One of
idle,oom,crashed,requested,kill services[].detailservices[].health- ; every non-healthy state carries the exact next command
services[].health.detailservices[].health.nextservices[].health.reason- One of
memory_growth,hmr_slow,disk,watch_limit,hung,crash_loop services[].health.state- One of
healthy,degraded,failed services[].metricsservices[].metrics.baseline_rss_bytesservices[].metrics.cache_bytesservices[].metrics.cpu_milliservices[].metrics.fdsservices[].metrics.hmr_p50_msservices[].metrics.inotify_watchesservices[].metrics.io_bytes- bytes the container's processes read and wrote (cgroup io.stat), sampled while it starts
services[].metrics.rss_bytesservices[].metrics.sampled_atservices[].nameservices[].restartsservices[].serving- the generation this service serves
services[].started_at- when the running process started; how long a start or a prepare step has taken
services[].state- One of
waiting,starting,ready,completed,failed,stopped,not_started source- One of
worktree,trunk,branch,checkpoint ssh_host_key- the session's openssh host key line
state- paused: stopped with its checkpoint and kept; dev.sessions.start places it againOne of
pending,starting,ready,degraded,disconnected,lost,stopping,paused,stopped,failed state_reason- why the session is in its state. pending: no_capacity, worker_starting or no_worker, or agent_exit_unavailable while no worker that runs the agent's own exit asks for it; lost: worker_lost; stopping, paused and stopped: requested, idle, max_lifetime, budget, kill, access_changed, recreated, checkpoint_expired (a paused session's checkpoint expired, dev), or stopped when the holder stopped with no reason; failed: the worker's failure code, template_digest_mismatch, start_failed, services_failed or an infrastructure code such as disk_full or toolchain_unavailable. a service that never gets ready leaves the session degraded with no reason (
ciresk dev upanswers the CLI error service_not_ready) switchswitch.fromswitch.phase- One of
applying,preparing,restarting switch.totemplatetemplate_digesttimings- milliseconds from create, derived from the session's events
timings.create_mstimings.lease_mstimings.prepare_mstimings.ready_mstimings.sync_mstree_idunpushed_files- writer cloud: files changed since the trunk tree, until forge pushes them
view- whether the session's view hides any path; never which
view.policy_versionview.restrictedweb_gateway- dev.sessions.get only: whether the installation serves sessions in the browser (a preview domain is configured); the console offers no browser button without it
weightweight.cpus_milliweight.disk_bytesweight.memory_bytesweight.memory_max_bytesworkerworker_release- the release the holding worker registered with (its software_version label), so a rollout is visible
workers- only on a pending session whose state_reason is no_worker because the organisation runs on its own workers: nothing of the cell starts one, so a client says to start one of the organisation's enrolled workers; absent otherwiseOne of
customer workspaceworkspace.bytes_materialisedworkspace.files_materialisedworkspace.files_totalworkspace.recent_waitsworkspace.wait_p95_msworkspace.waits_last_minwriter- One of
local,cloud
curl -X POST "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/stop" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Idempotency-Key: b7f15d8d-ee38-46db-ae26-6fb97e81ef7d" \
-H "Content-Type: application/json" \
-d '{
"reason": "idle"
}'