Repository navigation
feat(cloud): let an agent cloud use the stored GitHub sign-in - #1896
Merged
Merged
Conversation
Claude review, round 1 of 2
Push the fixes, then add the |
An agent's cloud takes the chain of this computer's own GitHub sign-in instead of a GitHub App installation token. The worker renews that chain from its refresh token, so the cloud keeps pushing, opening pull requests and merging while this computer is off, and the chain's account makes every commit and pull request the person's own. An agent's create reads the chain from this computer and installs it as payload version 1, which the person's own card sign-in already used. When no chain is stored and the policy forbids continuing without GitHub access, the create runs the same sign-in once and reports the device code in its operation status; a policy that allows the skip asks nobody. Every refusal happens before a card exists or a worker is rented, and names the setting that resolves it. The installation token is no longer a credential of an agent's cloud: github/installation.rs, the version-2 installation payload and the cloud-worker-github-token boundary page are removed. github.private_key_file and the app's private key stay, because the app and the card's sign-in still use them.
peters
force-pushed
the
feat/cloud-worker-token
branch
from
October 27, 2026 17:04
5ca603a to
9e3ee94
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
An agent's cloud now gets its GitHub access from this computer's stored GitHub sign-in, and from
nothing else.
#1895removed the App installation token, which lasted one hour. What replaces it is the chainHorizon already keeps for a person: an 8-hour access token and a refresh token that lives about six
months. Installed in the worker, the worker renews it itself, so a cloud keeps pushing after the
person's computer is switched off — which is the whole point of renting one.
The chain carries the person's account, so the worker's commits and pull requests are authored as
the person and not as a bot. The author address is always
<id>+<login>@users.noreply.github.com:GitHub attributes that address to the account whose numeric ID begins it, so it works when the person
keeps their email private, and no private address can leak into a commit.
Behavior
agent_lifecyclepolicy. The person's own create is unchanged, and so is the card's Connect GitHub.
policy, a policy path that is not a Git checkout with a GitHub origin, or a sign-in that did not
finish. Each names what to do.
allow_github_sign_in_skipis false, the create runs thesign-in itself: the device code reaches the agent through its operation status, and the create
continues when the person approves it. Without that the first cloud could never bootstrap. With
allow_github_sign_in_skip: truethe create continues without GitHub access instead of asking.kind: "person"andrenewal: "worker"in its status, so an agent can tellthat the access renews itself and needs nobody at this computer.
What stays the same
The person chain, worker payload version 1,
cloud_create,cloud_delete,cloud_exec, thedelete lease, the policy gate and the provider choice. There is no second credential field: an
agent's cloud has one way to get GitHub access.
Trust boundary
docs/review/trust-boundaries/cloud-worker-person-chain.md— a pull request body, a repository nameand a worker's status line are untrusted; the chain, its refresh token and the client secret are
this computer's, and the worker holds them.
No visible change
No visible change: no new window, control or card state. An agent's create shows the same sign-in
prompt the person's path shows when it has to ask.
Validation
cargo fmt --all -- --check— passcargo nextest run -p horizon-core -p horizon-ui -p horizon-cloud -E 'test(cloud) or test(github)'— 2795 passcargo clippy --all-targets --features speech,trace-profiling -- -D warnings— pass./scripts/check-maintainability.sh— passpython3 -B scripts/check-horizon-mcp-skills.py— passRebased onto
#1895, so the worker payload has one version, the sharedServes/servinghelpersstay deleted, and the person chain reads the worker's status directly.
Review size
18 files, 1190 lines, inside both thresholds.