Skip to content

docs: plan the agent credential home and agent login (OSS plan #17) - #48

Merged
jiashuoz merged 1 commit into
mainfrom
docs/agent-credential-home-plan
Sep 5, 2026
Merged

docs: plan the agent credential home and agent login (OSS plan #17)#48
jiashuoz merged 1 commit into
mainfrom
docs/agent-credential-home-plan

Conversation

@jiashuoz

@jiashuoz jiashuoz commented Sep 5, 2026

Copy link
Copy Markdown
Member

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

  • Agent home. One docker volume per (creator, workspace), mounted at /rainier/agents, with CLAUDE_CONFIG_DIR and CODEX_HOME pointing the agents at their subdirectories. $HOME and 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; destroy leaves it; docker commit excludes it by construction.
  • Sync. sessiond fetches the provider's allowlisted files at boot, puts them on every change (a background token refresh included), and empties them on a downward revoke — three new methods on the session RPC that already carries mint_git_credential, answered by self-hosted controld beside the mint and by a hosted cell on the same runnerplane.Host.SessionRequest hook. Custody never blocks or fails the agent; an old runner fails the boot stage with a sentence that names the fix.
  • Custody. One sealed set per (user, provider), reaching every workspace the person is a member of, with membership re-checked at each delivery by asking the host's authorizer whether the creator may still attach to their own session there — no new action in the frozen control contract. Logout revokes everywhere; leaving a workspace withdraws only there.
  • One table. Everything provider-specific is a row in 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.
  • CLI. 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 (HOME for the agent process alone) if it does not.

Proof

A synthetic test provider, 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. Then v0.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

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
@jiashuoz
jiashuoz merged commit 4061cd9 into main Sep 5, 2026
@jiashuoz
jiashuoz deleted the docs/agent-credential-home-plan branch September 5, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant