claude_profile 1.4.1

Claude Code account credential management and token status
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Subprocess

### Scope

- **Purpose**: Document the isolated subprocess layer — the `run_isolated()` contract, credential write-back protocol, and each invocation site within `claude_profile`.
- **Responsibility**: Authoritative reference for how `claude_profile` spawns, monitors, and harvests credentials from isolated Claude binary subprocesses.
- **In Scope**: `run_isolated()` API contract, credential write-back protocol, and the three invocation contexts (token refresh, session touch, browser relogin).
- **Out of Scope**: `run_isolated()` implementation internals in `claude_runner_core`; quota fetch HTTP mechanics; `IsolatedModel` variant definitions (→ `claude_runner_core/src/isolated.rs`).

### Overview Table

| ID | Name | Purpose |
|----|------|---------|
| 001 | [`run_isolated()` Contract]001_run_isolated_contract.md | API signature, isolation mechanism, result types, error types |
| 002 | [Credential Write-Back Protocol]002_credential_writeback.md | How refreshed credentials flow from subprocess back to disk and live session |
| 003 | [Token Refresh Invocation]003_token_refresh_invocation.md | When and how `refresh_account_token()` is called for expired token recovery |
| 004 | [Session Touch Invocation]004_session_touch_invocation.md | When and how `refresh_account_token()` is called for idle window activation |
| 005 | [Browser Relogin Invocation]005_relogin_invocation.md | When and how `claude` is spawned with inherited TTY for RT-expired recovery |