forked from bchanot/claude
`bash lib/profile.sh current` is 12s+ — far too slow to call from the statusline hook (runs on every keystroke). Add a one-line cache file at `<repo>/.active-profile`, written by `cmd_apply` and `cmd_reset`. The statusline reads the file directly with a single `head -n1`, no sub-shell into `profile.sh`. Behavior: - `bash lib/profile.sh set <name>` (which ends in `cmd_apply`) and `bash lib/profile.sh apply <name>` both write `<name>` to `<repo>/.active-profile`. - `bash lib/profile.sh reset` writes the literal `none`. - Statusline inserts the cached profile name between the plan segment and the context-bar segment, e.g. `Opus 4.7 | claude (master) | Max | full | ████░░░░░░ 42% | 3m`. - Missing or empty cache → statusline shows `?`. Cache file is gitignored — it tracks runtime state, not source. Co-Authored-By: Claude <noreply@anthropic.com>