Cloud actions connectivity and operations
Cloud actions let approved AI tools ask Guard Cloud to act through accounts in the Guard Cloud workspace paired with this computer. The connection is controlled by hol-guard connect, while the local CLI, daemon, bridge, and dashboard show its state and provide safe ways to configure or remove access. Local protection remains separate from this connection.
Operating model
Cloud actions use the computer's Guard Cloud pairing. They do not use a second Cloud actions sign-in. Guard Cloud makes the final decision for each request, and a Cloud decision never approves a protection action that Guard pauses on this computer.
Pairing and access
The pairing is the trust link between this computer and one Guard Cloud site and workspace. During hol-guard connect, the person can allow AI tools on the computer to use Cloud actions or leave that option off. Guard stores the last answer as a display hint, but it checks the active pairing each time an AI tool requests access.
Access is short-lived and tied to the named AI tool. The local bridge obtains it when needed and keeps it in memory. It does not place the access in an AI tool settings file or in a saved diagnostic bundle.
The main access outcomes are:
| Outcome | Meaning | Main action |
|---|---|---|
| Paired and on | The pairing allows Cloud actions. | Configure an AI tool or use its existing bridge. |
| Paired and off | The person left Cloud actions off for this computer. | Run hol-guard connect again and allow Cloud actions. |
| Not paired or expired | The computer has no usable pairing. | Run hol-guard connect. |
| Refused or unavailable | Guard Cloud cannot grant or confirm access. | Check the connection, permissions, or service state. |
This flow shows how a pairing becomes AI tool access and then a Cloud action request.
flowchart LR
A[hol-guard connect] --> B[Pair this computer]
B --> C{Cloud actions allowed?}
C -- No --> D[Cloud actions remain off]
C -- Yes --> E[AI tool starts local bridge]
E --> F[Bridge requests short-lived access]
F --> G[Guard Cloud checks pairing and tool]
G --> H[Cloud action request]
References: src/…/connect_cloud_actions.py• L1-13 src/…/cloud_actions_access.py• L1-13 src/…/cloud_actions_bridge.py• L1-13
Connection boundaries
The local bridge is the boundary between an AI tool and Guard Cloud. The AI tool speaks to the bridge as a local MCP server. The bridge forwards requests to the Cloud actions service for the paired site and returns the result to the AI tool.
The pairing is presented only to Guard Cloud. The Cloud actions service receives the short-lived access for the selected AI tool. This keeps provider credentials and the computer's pairing out of the AI tool process and its settings.
References: src/…/cloud_actions_bridge.py• L64-75 src/…/cloud_actions_bridge.py• L99-175 src/…/cloud_actions_access.py• L153-210
Managed host configuration
Host configuration adds one named bridge entry to an AI tool's user settings. The configuration is a local launch instruction; it does not store Cloud access and it does not make the AI tool sign in to Guard Cloud.
Supported AI tools
The managed setup currently covers Claude Code, Codex, and Cursor. Each tool has its own user settings file and reload step. The setup uses the same server name, hol-guard-cloud, so status and restore can identify the entry that Guard owns.
The configuration process has two modes:
hol-guard cloud-actions ai-tools configure <ai-tool> --dry-runpreviews the exact entry and writes nothing.hol-guard cloud-actions ai-tools configure <ai-tool> --applychecks Cloud access, then adds or updates only the Guard entry.
The preview also detects an existing entry that points to another service or a file that cannot be changed safely. Guard refuses those cases instead of silently replacing unrelated settings.
References: src/…/cloud_actions_host_config.py• L1-19 src/…/cloud_actions_host_config.py• L67-94 src/…/commands_parser_cloud_actions.py• L199-231
Safe configuration changes
An applied change is tied to the exact file that the preview read. Guard keeps a private copy of the earlier file before it writes. If the AI tool or a person changes the file first, Guard stops rather than overwriting that change.
The settings file is written as one safe replacement and read back after the write. Guard refuses linked files and keeps the earlier copy when it cannot confirm the result. These rules protect both the AI tool's other servers and its unrelated settings.
References: src/…/cloud_actions_host_apply.py• L1-20 src/…/cloud_actions_host_apply.py• L80-150 src/…/cloud_actions_host_apply.py• L237-249
Connection health
Health reporting separates saved pairing information from a live Cloud check. A saved pairing can be valid while the service is offline, the Cloud offer has changed, or the connection has been revoked.
CLI status and diagnosis
hol-guard cloud-actions status reports the paired site, workspace, local Cloud actions choice, and the current service check. status --offline reads only saved local data and does not contact Guard Cloud. This makes it suitable for a read-only view when network access or store changes are not wanted.
hol-guard cloud-actions doctor checks the pairing, the Cloud service, access for the first configured AI tool, and each supported AI tool's settings state. It returns stable result and reason fields for scripts. An optional bundle contains the diagnosis without access values or AI tool settings.
References: src/…/commands_dispatch_cloud_actions_status.py• L35-69 src/…/commands_dispatch_cloud_actions_status.py• L89-133 src/…/commands_dispatch_cloud_actions_status.py• L209-300 src/…/cloud_actions_saved_pairing.py• L1-8
Live service checks
The service check asks Guard Cloud whether the expected Cloud actions resource is available. The connection check sends a small ping with the selected AI tool's access. Redirects are not followed, and status output includes only safe state and message values.
The useful state distinction is:
| State | Meaning |
|---|---|
current or connected | The service or access check succeeded. |
offline | Guard Cloud could not be reached. |
changed | The Cloud service description no longer matches the pairing. |
reconnect | Guard Cloud no longer accepts this computer's connection. |
not_turned_on or off | Cloud actions are not enabled for this computer or site. |
not_checked | No live check was made. |
References: src/…/cloud_actions_health.py• L1-19 src/…/cloud_actions_health.py• L81-141 src/…/cloud_actions_status.py• L164-188
Local status reporting
The daemon gives the dashboard a small local projection of Cloud actions. A read returns saved data quickly. A check asks Guard Cloud, saves the safe result, and returns the new projection.
Dashboard status
The dashboard reads GET /v1/cloud-actions/status for the saved connection view. Its Check now control uses POST /v1/cloud-actions/status to perform a live check. Only an authenticated daemon or dashboard session can use these routes.
The saved result names the workspace, Cloud site, local on/off choice, check state, and check time. It marks old results as stale instead of presenting them as current. Checks are limited to one at a time and no more than once per minute.
The dashboard offers reconnect guidance when the pairing is revoked, the Cloud offer changes, or Cloud actions are off. It also links to Cloud review, action history, included actions, and connected accounts. Those pages remain in Guard Cloud; the local dashboard does not claim to own their data.
References: src/…/cloud_actions_status.py• L1-28 src/…/cloud_actions_status.py• L40-44 src/…/cloud_actions_status.py• L154-161 src/…/cloud_actions_status.py• L191-231 src/…/cloud_actions_status_http.py• L32-77 src/…/settings-workspace-BLKToLwS.js• L2695-2731
Protection independence
Cloud actions are an optional remote capability. Local protection continues when Guard Cloud is offline, when the computer is disconnected, or when the Cloud plan has no included actions left. A Cloud action decision also cannot approve a local protection pause.
References: src/…/settings-workspace-BLKToLwS.js• L3037-3050
Cleanup and access removal
Cleanup has two separate goals: remove old alpha sign-in data and remove current AI tool access. The first is migration cleanup. The second is an explicit operational control.
Alpha data cleanup
Older builds saved a separate Cloud actions sign-in under the Guard home. A Cloud actions command or dashboard status read removes those old profiles, their matching secrets, and old check files. It leaves settings backups in place because those backups may still be needed to restore an AI tool configuration.
References: src/…/cloud_actions_alpha_cleanup.py• L1-10 src/…/cloud_actions_alpha_cleanup.py• L80-94 src/…/commands_dispatch_cloud_actions.py• L202-209
AI tool restoration
hol-guard cloud-actions ai-tools restore <ai-tool> first asks Guard Cloud to end that tool's access, then restores the last Guard-managed settings change. If the file is unchanged, Guard restores the full earlier file. If other settings changed later, it restores only the Guard entry. If that entry changed too, Guard leaves it alone and reports the conflict.
The command can still restore local settings when the pairing is absent or expired because the local backup remains available. It does not claim that Cloud access ended unless Guard Cloud confirmed it.
References: src/…/commands_dispatch_cloud_actions_ai_tools.py• L163-249 src/…/cloud_actions_host_apply.py• L163-227 src/…/cloud_actions_access.py• L277-303
CLI and daemon controls
The CLI controls pairing, AI tool setup, diagnosis, and removal. The daemon controls the local dashboard view and rate-limited live checks. Both use the same pairing and state rules.
Command controls
The main operator controls are:
| Control | Role |
|---|---|
hol-guard connect | Pair or reconnect the computer and choose whether AI tools may use Cloud actions. |
hol-guard cloud-actions status | Show the connection and service state. |
hol-guard cloud-actions status --offline | Show saved state without a network check. |
hol-guard cloud-actions doctor | Check the pairing, service, AI tool access, and host settings. |
hol-guard cloud-actions ai-tools configure ... --dry-run | Preview a host change. |
hol-guard cloud-actions ai-tools configure ... --apply | Apply a host change after access succeeds. |
hol-guard cloud-actions ai-tools restore ... | End one tool's access and undo its Guard-managed host change. |
hol-guard cloud-actions accounts connect ... | Open Guard Cloud so a provider account can be connected in the browser. |
The Cloud workspace flag names a Guard Cloud workspace. It is separate from the local --workspace folder flag. The CLI rejects a local folder where a Cloud workspace ID is expected.
References: src/…/commands_parser_cloud_actions.py• L41-51 src/…/commands_parser_cloud_actions.py• L159-236 src/…/commands_dispatch_cloud_actions.py• L129-179
Removed alpha controls
The old login, logout, and workspace select commands no longer manage Cloud actions. They return a clear migration message that points to hol-guard connect. This avoids creating a second access path that could disagree with the device pairing.
References: src/…/commands_dispatch_cloud_actions.py• L83-105 src/…/commands_parser_cloud_actions.py• L154-157
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the pairing report, local status projection, CLI output, and dashboard state names aligned.
- Keep the
hol-guard-cloudentry contract aligned with the bridge command and every supported AI tool's settings format. - Preserve the rule that apply checks the preview bytes and restore keeps later user edits outside the Guard entry.
- Keep live checks and access exchange bound to the pairing's Cloud site and workspace.
- Keep diagnostic bundles and status projections free of access values, settings content, and response bodies.
- Keep dashboard check limits and the CLI's offline read behavior consistent with their stated read/write boundaries.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The pairing is missing, expired, or revoked | The bridge cannot obtain access and AI tool requests fail. | Reconnect with hol-guard connect. |
| Cloud actions are off in the pairing | Configuration does not write a usable AI tool entry. | Reconnect and allow AI tools to use Cloud actions. |
| An AI tool settings file changes after preview | Guard writes nothing. | Run the preview and apply command again. |
An existing hol-guard-cloud entry points elsewhere | Guard refuses to replace it. | Review or remove the conflicting entry first. |
| Guard Cloud is offline or the service offer changed | Live state is unavailable or asks for reconnect. | Check the network or reconnect when the Cloud offer changed. |
| A status check is repeated too soon or overlaps another check | The dashboard receives a wait or busy result. | Wait for the returned retry period. |
| The Guard entry changes before restore | Guard leaves that entry unchanged. | Review the entry and remove or edit it explicitly. |
Key files
| File | Why to read it |
|---|---|
| src/…/connect_cloud_actions.py | Defines the pairing choice and saved Cloud actions report. |
| src/…/cloud_actions_access.py | Defines short-lived access exchange and revocation. |
| src/…/cloud_actions_bridge.py | Shows the AI tool to Guard Cloud request path. |
| src/…/cloud_actions_host_config.py | Defines supported AI tools and previewed host entries. |
| src/…/cloud_actions_host_apply.py | Defines safe apply, backup, and restore behavior. |
| src/…/commands_dispatch_cloud_actions_status.py | Defines CLI status and doctor results. |
| src/…/cloud_actions_status.py | Defines the daemon's saved and live status model. |
| src/…/cloud_actions_status_http.py | Defines authenticated dashboard check responses. |
| src/…/settings-workspace-BLKToLwS.js | Shows how the dashboard presents state and operator remedies. |
Related pages: Policy authority and cloud exceptions, Policy bundles, integrity, and sync, Cloud exception request workflow, Cloud review delivery and recovery, Business policy documents and recovery