Request more CPU or RAM for a running container

An agent can request a finite CPU or RAM increase through devctrl instead of changing Docker, host or user limits itself. The request applies to its exact current container, including every session and subprocess in that container. It does not change repository defaults or other containers.

Use the typed session MCP operation:

{
  "tool": "request_workspace_resources",
  "arguments": {
    "memoryBytes": 8589934592,
    "cpus": 4,
    "reason": "Run one bounded build after saving the current checkpoint."
  }
}

Either resource can be requested alone. Limits are absolute totals, rather than amounts to add to the current allocation. Memory uses bytes and CPU uses cores. A secret-free reason explains the bounded workload. Reuse an optional idempotency UUID only for an identical request; do not repeatedly submit the same request while an approval is pending.

devctrl derives the session, owner, repository, host, container and account from the authenticated session. The agent cannot choose another container by supplying its ID. The approval records the original limits, requested totals, affected sessions and the resource-budget assessment. An operator can approve only the RAM or CPU action; required owner, target and quota constraints cannot be unchecked.

Approval is separate from application. A saved or queued request means that the host still needs to update the running container. Only applied means that the execution host verified the actual Docker and kernel limits and the preservation checks. A policy document or a successful prompt delivery does not prove that more memory or CPU is available.

Concurrent approved increases can share one monotonic host update. A verified actual limit may therefore exceed an earlier request’s approved minimum; the interface displays both its approval and the actual observed shared limits.

Poll get_workspace_resource_request_status({"approvalId":"…"}) for the request receipt. Changed targets, conflicting limits, unavailable host evidence and budget failures remain visible. A definitive retryable failure has its own limit-application retry operation; it never replays native approval text. When the container or applicable budget changes, request again instead of reusing stale authorization.

These requests cannot raise a server user's quota or make resource limits unlimited. If the requested total exceeds the user budget, an administrator must change that quota separately. Other users' containers are not stopped to make room. Process, network and filesystem permissions are outside this request.

The existing Approvals screen displays current, requested and selected or approved totals, affected sessions, budget availability and host application status. History is loaded on demand in bounded repository-scoped pages; startup does not fetch all old resource requests. A running container keeps its sessions while supported limits are applied.

Before requesting more resources, checkpoint work and bound job parallelism. Continue using the currently observed limits until host application is confirmed. Additional memory is not a substitute for a cleanup strategy for temporary files, child processes and test containers.

CLI

From inside an authenticated agent session:

devctl resources request --file increase.json --json
devctl resources status APPROVAL_ID --json

increase.json contains memoryBytes and/or cpus, reason and optionally idempotencyKey, matching the typed MCP input. Request creation requires the actual MCP socket or DEVCTL_MCP_SESSION_TOKEN; there is no --session or workspace selector for impersonating another session.

An authenticated owner/operator client can also read status over HTTP. A definitively failed, retryable request can use:

devctl resources retry APPROVAL_ID --json

That command invokes the reviewed host-limit retry operation. It does not replay approval text or bypass fresh container and resource-budget checks.

Host requirements

Live application requires Linux cgroup v2 and a verified, complete view of the host process and cgroup hierarchy. Native Linux tooling uses /proc and /sys/fs/cgroup. Containerized host tooling uses the existing trusted DEVCTL_SERVER_CGROUP_CONFIG file’s procRoot and mount, or the explicit DEVCTL_HOST_PROC_ROOT and DEVCTL_HOST_CGROUP_ROOT deployment settings. A delegated subtree with hidden ancestors is insufficient for verifying the user’s real parent limits. The observing process must also use the matching host cgroup namespace: read-only host-directory mounts alone can retain a container-private, virtualized view and fail verification. See the Linux cgroup namespace documentation.

Unavailable or unbounded observations of managed workloads block admission with a visible reason. They do not count as free capacity or an applied increase. This feature does not install host mounts or restart services to manufacture the missing evidence; the server administrator must provide the supported host observation configuration.