docs: plan the agent credential home and agent login (OSS plan #17) - #48
Merged
Conversation
A coding agent inside a session cannot be logged in today: its home directory is on the read-only rootfs, and nothing carries a login from one session to the next. This plan gives each (creator, workspace) a writable agent home on the runner at /rainier/agents, points Claude Code and Codex at their subdirectories through the variables they already honor, and has sessiond keep the provider's allowlisted credential files equal to the control plane's sealed copy — fetched at boot, put on every change, emptied on a downward revoke — over the session RPC that already carries the git credential. Custody is one set per (user, provider), projected into every workspace the person is in with membership re-checked at each delivery; logout (everywhere) and withdrawal (leaving one workspace) are kept apart. Everything provider-specific is one row in controlapp; sessiond, the driver, the stores, and the RPC never spell a provider name. Three CLI verbs and /v0/agents on top. Tag v0.0.3. Task 0 is four probes on the fleet VM — where Claude Code writes its onboarding file under CLAUDE_CONFIG_DIR, the paste-a-code login inside a container, the egress hosts, two processes sharing one directory — and the plan carries the fallback if the first comes out the other way. The live-fleet phase uses a synthetic `test` provider so the e2e never touches a real account; the one real login is the operator's and leaves no transcript. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyUMzcATwGtnL9bfwMkr1C
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.
The OSS half of a logged-in agent: one login inside an ordinary session, and every later session of that person — any workspace, any runner — starts with Claude Code or Codex already authenticated, with no credential ever pasted into a sandbox, written into the workspace, baked into a snapshot, carried in a create, or printed in a log.
The shape
/rainier/agents, withCLAUDE_CONFIG_DIRandCODEX_HOMEpointing the agents at their subdirectories.$HOMEand the read-only rootfs stay as they are, so cached setup products keep working. The driver prepares it with the same CAP_CHOWN-only job the workspace volume gets;destroyleaves it;docker commitexcludes it by construction.mint_git_credential, answered by self-hosted controld beside the mint and by a hosted cell on the samerunnerplane.Host.SessionRequesthook. Custody never blocks or fails the agent; an old runner fails the boot stage with a sentence that names the fix.controlcontract. Logout revokes everywhere; leaving a workspace withdraws only there.controlapp/agents.go; a grep for either provider name across sessiond, the driver, runnerd, the stores, and the RPC dispatch stays empty. A third agent is a row plus its probes.rainier agent login|ls|logout; login is a session whose only job is the vendor's own flow, attached to your terminal.Before any worker starts
Task 0 is four probes on the fleet VM, recorded as yes/no and host names only. The one that matters is whether Claude Code writes its onboarding file under
CLAUDE_CONFIG_DIR; the plan carries the fallback (HOMEfor the agent process alone) if it does not.Proof
A synthetic
testprovider, enabled only on the e2e's controld, lets the live-fleet phase prove the whole loop — login, second runner boots with the file, a rewrite becomes v2 within five seconds, snapshot excludes it, logout empties the live session — without a real account anywhere near the script. The one real Claude Code login is the operator's, recorded pass/fail. Thenv0.0.3.Design and decisions: rainier-cloud
docs/superpowers/specs/2026-09-04-agent-credential-home-design.md. Documents only.🤖 Generated with Claude Code
https://claude.ai/code/session_01KyUMzcATwGtnL9bfwMkr1C