State determines what can be done now. Security boundaries determine what must not be leaked or bypassed even when an action is technically possible. Development must satisfy both kinds of constraint.

Workspace state decisions

StateCan SSH/SCP/WebChat be used?Action
Non-terminal creation stateNoLet the CLI keep polling. After a timeout, query the same Workspace ID
activeWebChat only while connection_status=ready; SSH/SCP only after workspace connect returns bound + ssh_verified=trueUse only the exact commands and URLs from the current result and observe expires_at. With authorization, use workspace resume for an expired connection
failedNoRecord failure_code and stop connection attempts
closedNoTerminal state; workspace resume cannot reopen it
publishedNoTerminal state; view the published version on the website
cleanup_pendingNoThe platform is cleaning up; do not keep writing
close_pendingNoThe platform is closing the Workspace; do not keep writing
A timeout is not a terminal state

WORKSPACE_TIMEOUT means only that this bounded wait expired. Preserve the workspace_id and last_status in the error, then run workspace status. Do not create another Workspace.

Publish, version, and Agent supply states

A Publish Job and publication visibility are related but separate state axes. The version's online/offline state displayed on the page and the Agent-level supply_status are two more distinct fields. For routine developer actions, use the page's Online/Offline state. When diagnosing APIs, do not mix the terms.

LayerKey statesCompletion gate
Publish Jobqueuedrunningsucceeded; or failed/canceledsucceeded
Publicationpendingsyncingvisible; or failedvisible
Version / UIoffline / onlineThe page must show Online before the version accepts formal invocations
Agent supplysuspended / listedWhen online, it should also be listed. Do not call this layer Online/Offline

A recommended completion condition is:

publish_job == "succeeded"
and publication == "visible"
and version_status == "online"
and supply_status == "listed"
and real_invocation_verified == true

OAuth sign-in security

When authentication is required, the CLI opens a browser and applies four key protections:

Credentials go only into secure system storage

PlatformStorage used by the CLI
WindowsWindows Credential Manager
macOSKeychain
LinuxSecret Service (secret-tool)

If secure storage is unavailable, the CLI returns credential_store=unavailable and does not fall back to writing the session in plaintext to an ordinary configuration file. Never use a custom script to store a Token in the project directory, shell history, or an environment snapshot.

SSH key boundaries

Do

Never

Redaction in logs, screenshots, and collaboration

Control-plane boundaries

The website and CLI are the public developer control planes. CLI 0.7.3 provides workspace sources, workspace resume, version webui-ports get/set/refresh, and an allow-listed portal surface that includes publishing and supply-state operations. Portal writes require explicit authorization, --confirm, and any idempotency/ETag inputs required by that command. The website form still has no WebUI-port field, and there is still no public Workspace close command or generic file sync command. These boundaries must not be bypassed by guessing internal URLs, reusing service credentials, or writing custom database/API requests.