Resource limits

Optional CPU and memory limits for Project containers, configured per Project (Project group), repository and session. Nothing is limited by default. Limits are set in Settings → Resource limits (terminal and browser) or through the Core API, and are applied to the containers that run the work.

Inheritance

Each field (CPU, memory) is resolved independently from the most specific level that sets a value:

  1. Session — only while it is the only active session in its container;
  2. Repository — the repository's container limit (Project.limits);
  3. Project — the Project group, inherited by all of its repositories.

Example: Project acme sets 8 CPU and 16 GiB, repository api sets 6 GiB, and a session alone in its own container sets 2 CPU. That container runs with 2 CPU (session) and 6 GiB (repository).

A field that no level sets is not limited. A value that a container editor set directly on one container (Projects → container → limits, or devctl project limits) is kept until a level sets that field; a value that was applied from a level is removed again when every level is cleared.

Shared containers

Several sessions can share one container (the repository's main container, or a container shared by repositories of the same group). Docker limits a container, not a process inside it, so a shared container always uses the repository level (falling back to the Project level). Session values remain stored but are shown as not in effect while the container hosts more than one active (starting or running) session. When the container again hosts a single active session, that session's value applies live. The settings view, the Projects container row and every session row say when the repository limit applies because the container is shared.

A container shared by another repository of the group follows the limits of the repository that owns the container.

Where limits apply

Server-user containers reserve their resource envelope at start. Their limit changes are recorded and applied at the container's next start; the settings view marks such containers.

Validation

Current consumption

API

Route Policy Purpose
GET /v1/resource-limits user (owner-filtered) Settings per level, effective limits with source level, shared state, host capacity, usage
PUT /v1/resource-limits/projects/:id operator Project group limits
PUT /v1/resource-limits/repositories/:id operator Repository limits
PUT /v1/resource-limits/sessions/:id operator Session limits

Body: {"limits":{"cpus":2,"memoryBytes":4294967296},"revision":3}. Omitted fields inherit. The response returns the new view and one entry per affected container: live (a Host command was queued), next-start or unchanged. Changes are audited as resource-limits.<level>.changed.

Project-group and session values live in Core integration state (resource-limits:v1); repository values are Project.limits, which also seeds new containers and placement admission.

Limitations