Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Per-profile state lives under `~/.clauth/`. On Unix that whole tree is owner-onl
| `~/.clauth/.claude-json-sync-written.json` | the `.claude.json` copies clauth wrote: each one's path, mtime, size, a SHA-256 of its bytes and the rank of the Claude Code write they came from. No credential and no config content | file `0600` |
| `~/.clauth/.settings-sync-written.json` | the same written-copy record for `settings.json`: path, mtime, size, a SHA-256 and a carried rank per copy clauth wrote, never the settings themselves | file `0600` |
| `~/.clauth/backups/` | byte copies of the files a sync pass refused to rewrite: `~/.claude.json`, which can carry `primaryApiKey` and its approval ledger, and `~/.claude/settings.json`, whose `env` block can hold secrets. One file per refusal in each clauth process, named `<file>.<utc stamp>`, the newest 10 per file kept; the live files are left alone and that process logs one line naming its copy, so several running `clauth start` sessions can each save one | dir `0700`, files `0600` |
| `~/.clauth/base-env.json` | the values your own `~/.claude/settings.json` held under custom env keys a profile's `[env]` replaced (never the keys clauth sets from a profile's endpoint, model or effort fields), so a switch away can put them back; a value clauth records writing is kept only as a SHA-256 digest (an older clauth's value for an account since deleted reads as yours and is kept raw) | file `0600` |
| `~/.clauth/base-env.json` | the values your own `~/.claude/settings.json` held under custom env keys a profile's `[env]` replaced (never the keys clauth sets from a profile's endpoint, model or effort fields), so a switch away can put them back; a value clauth records writing is kept only as a SHA-256 digest (an older clauth's value for an account since deleted reads as yours and is kept raw). It also keeps a SHA-256 digest of each model value clauth wrote (`model`, `advisorModel`, `ANTHROPIC_DEFAULT_*_MODEL`, `CLAUDE_CODE_SUBAGENT_MODEL`), so a switch removes only those | file `0600` |
| `~/.clauth/rescue.lock` | the lock held while one rescue lands a file from a session's runtime tree into `~/.claude` (a move, an append to a transcript, or a copy beside one), so two rescues never land on one name at once. Empty — a lock file only | file `0600` |
| `~/.clauth/.oauth-strip-pending` | a `pid:nanos` stamp saying a switch's `oauthAccount` strip is still owed; the next daemon tick or sync pass lands the strip and deletes it. No credential | file `0600` |
| `~/.clauth/stats-base.json` | the Tokens tab's frozen copy of `~/.claude/stats-cache.json`: usage counts, no credential | file `0600` |
Expand All @@ -73,7 +73,7 @@ clauth reads that item before every write (to carry your MCP-server logins acros
- The repair never follows a symlink out of the tree, so it can't touch a file clauth doesn't own. On Windows, access falls to the default user-profile ACLs, which clauth does not loosen.
- A switch rewrites three files: `~/.claude/.credentials.json`, parts of `~/.claude/settings.json` (the `env` block, the top-level `model` key, `apiKeyHelper`), and `~/.claude.json`, whose stale account-identity block is dropped so Claude Code re-derives identity from the new token.
- The rest of `~/.claude/` is left alone. On macOS the switch writes the Keychain item above as well, because Claude Code reads the Keychain before the file there.
- Inside `~/.clauth/` a switch writes the incoming profile's store (the MCP-server logins it carries) and, with `preserve_non_login_keys` on, the outgoing profile's store, which takes what Claude Code saved beside that account's login. The daemon's and the TUI's start relink save into the active profile's store the same way. A switch normally also writes `~/.clauth/base-env.json` (the row above), which names the account it left active and holds your own `settings.json` values under custom env keys an account's `[env]` replaced.
- Inside `~/.clauth/` a switch writes the incoming profile's store (the MCP-server logins it carries) and, with `preserve_non_login_keys` on, the outgoing profile's store, which takes what Claude Code saved beside that account's login. The daemon's and the TUI's start relink save into the active profile's store the same way. A switch normally also writes `~/.clauth/base-env.json` (the row above), which names the account it left active and holds your own `settings.json` values under custom env keys an account's `[env]` replaced, plus digests of the model values it wrote.
- With `sync_mcp_logins` on (the default), the daemon also writes the store of every profile that keeps a Claude login or MCP logins in it, its `mcpOAuth` key only, when another store, a parked login, a running session's credentials file or (macOS) its per-session Keychain item holds a newer MCP-server login, and when it removes from that store a login one of those signed out of; on macOS a swap's hand-off does the same from the session's item. A profile with no such store (an api-key or third-party account) gets none. Neither writes a store a running session reads through its link, a Claude Code background job included, nor the store a running session's copy mirrors on a host without symlinks, nor the store of a session whose own file waits for the watchdog to copy it back, while that session runs, and neither writes anything while Claude Code's job list or clauth's live-session list cannot be read.
- `clauth login <name> --codex` is the one write into codex's own tree: it replaces `~/.codex/auth.json` with a symlink onto that profile's store (staged beside it and renamed over), so your codex and every clauth session share one chain; deleting the profile removes that link and says so. On a host without symlinks the file is copied instead and your codex keeps a second live copy of the chain, which clauth tells you at capture time.

Expand Down
Loading
Loading