alpacon work-session extend
Extend the expiry of an approved or active work session.
alpacon work-session extend SESSION_ID [flags]--reason is required. Whether the extension applies right away or waits for approval follows your workspace’s approval policy—see Applied vs. pending approval. Extending an AI-agent session that holds MFA-bypass sudo policies waits for a person’s approval in an Enforce workspace. See Extending with approval for how this works from the web console.
Options
--expires-at string New absolute expiry time (RFC3339)
--expires-in string New expiry set to now + duration (e.g. 2h)
-h, --help help for extend
--reason string Why the session needs more time (required)Examples
Extend a session by two hours from now:
alpacon work-session extend 11111111-2222-3333-4444-555555555555 --expires-in 2hSet a new absolute expiry time:
alpacon work-session extend 11111111-2222-3333-4444-555555555555 --expires-at 2027-01-15T10:00:00ZExtend with a reason, for a workspace that requires one:
alpacon work-session extend 11111111-2222-3333-4444-555555555555 --expires-in 2h --reason "customer escalation, still triaging"Applied vs. pending approval
- Applied — the command prints the new expiry and exits
0. - Pending approval — the workspace queues the extension for review instead of applying it. The session’s expiry is unchanged until a Superuser decides. The CLI prints a warning with the request id and the requested expiry, and exits
4. With--output json, the same information is emitted as a{"status": "pending_approval", ...}object on stdout.
A session with an MFA-bypass sudo policy always waits for approval when extended from the CLI, MCP, or an API token, even if the extension would otherwise apply immediately; an extension from the console does not have this additional hold.
extend has no --wait—check back with alpacon work-session describe SESSION_ID, or run extend again with a new reason once the request settles. Only one extension request can be pending on a session at a time; running extend again while one is already pending is refused.