# Restore `claudex` configuration

audience: AI coding agents first.

## Outcome

Restore missing statusline in installed `claudex`. Audit remaining `claudex` settings for proven source/runtime drift. Keep upstream Claude Code and unrelated settings unchanged.

## Status

`ACTIVE` — main session owns restoration. Worktree: `wt/fire-claudex-config-drift` at `/home/user/Projects/overdeck/.worktrees/fire-claudex-config-drift`.

## Task IDs

- #1 — restore `claudex` statusline.
- #2 — audit other `claudex` settings drift after restoration.

## Source request

2026-08-12 owner reported: "stasusline in claudex is missing - may be also other claude settings. i am not sure. config drift".

Owner corrections:

1. Scope is Overdeck component `claudex`, not upstream Claude Code.
2. Exact name is lowercase `claudex`, not ClaudeX.

## Acceptance criteria

1. Reproduce missing statusline through installed `claudex` configuration path.
2. Restore statusline through installed runtime before Git landing.
3. Prove installed `claudex` passes statusline configuration to Claude while retaining model picker settings.
4. Compare generated `claudex` settings with managed Claude settings; repair all proven drift required by `claudex`.
5. Add focused deterministic regression tests.
6. Preserve atomic rollback for live settings/runtime changes.
7. Run affected module tests without ignored warnings.
8. Commit, land, deploy landed source, and re-prove installed entrypoint.

## Preserved WIP / ref / path

- Branch: `wt/fire-claudex-config-drift`.
- Worktree: `/home/user/Projects/overdeck/.worktrees/fire-claudex-config-drift`.
- Shared main checkout WIP MUST remain untouched.
- Installed runtime: `/home/user/.local/bin/claudex` resolves to `/home/user/.local/share/overdeck/deploy/modules/systray/claudex.py`.

## Constraints

- Emergency order: reproduce → focused seam check → isolated candidate + rollback → install → installed proof → broad gates → Git.
- NEVER mutate shared main checkout.
- Do not conflate `claudex` with upstream Claude Code or a product named ClaudeX.
- Repair only measured drift; do not overwrite account-specific credentials or unrelated owner settings.

## Execution steps

1. Measure installed `claudex`, generated settings files, managed source settings, statusline executable, and live render.
2. Identify exact merge/override loss and smallest safe repair.
3. Add focused tests proving required settings survive generated model restrictions.
4. Build candidate and run focused tests.
5. Save rollback artifact; install candidate through project deployment path.
6. Prove actual installed `claudex` settings and statusline invocation.
7. Audit other settings keys using deterministic comparison; fix only required drift.
8. Run affected full tests, commit, land, deploy landed source, re-prove.

## Current receipt

2026-08-12:

- Tasks #1/#2 active under exact lowercase `claudex` scope.
- Isolated worktree claimed from current `origin/main`.
- Root cause measured: live `~/.claude/settings.json` and healer known-good both lost `statusLine`; live `statusline-router.sh` also carried an emergency render-disable line absent from deployed source.
- Drift audit found settings differences in `effortLevel`, `hooks`, `model`, and source-only `statusLine`. Preserved live preference/hook changes; restored only source-managed `statusLine`.
- Saved rollback copies for both live files.
- Restored live `statusLine` atomically and restored router from deployed source.
- Installed render proof is non-empty: model, workspace, context, and usage fallback lines render through `/home/user/.claude/statusline-router.sh` with `SYSTRAY_CODEX_ACCOUNT_SLUG`.
- Hardened healer candidate now requires a valid executable `statusLine` alongside hooks, preventing recurrence.
- Focused verification clean: healer 15/15; claudex/statusline pytest 114/114; `git diff --check` clean.
- Live healer hardening awaits landed deploy because the deploy-clone guard correctly refused direct mutation.

## Next executable action

Commit candidate, direct-land emergency fix, run `packaging/deploy-local.sh`, then re-prove installed healer and statusline.