13 surgical fixes: Linux compatibility, performance, installer, statusline, hooks.
Pure bug-fix release — no new features, no breaking changes. All fixes are surgical (1–8 lines each).
| Issue | Fix |
|---|---|
| #825 | pai alias pointed to removed skills/PAI/Tools/pai.ts — corrected to PAI/Tools/pai.ts |
| #757 | Alias written to .zshrc only — now detects $SHELL and writes to .bashrc, .config/fish/config.fish, or .zshrc |
| #755 | Installer hardcoded --mode gui — now auto-detects headless/SSH and falls back to CLI mode |
| Issue | Fix |
|---|---|
| #747 | Terminal width dropped on re-render — added persistent width cache to prevent mini mode flicker |
| #819 | ALG field always showed — — UpdateCounts.ts now extracts algorithm version from CLAUDE.md |
| #849 | OAuth token extraction was macOS-only — now reads ~/.claude/.credentials.json on Linux |
| #849 | tr ' ' '─' produced garbled output on GNU coreutils — replaced with sed 's/ /─/g' |
| Issue | Fix |
|---|---|
| #832 | DocCrossRefIntegrity ran inference unconditionally — now skips when 0 drift detected (saves ~15s/response) |
| #767 | WorkCompletionLearning .pop() always returned agents_spawned — replaced with tracked lineageSubKey |
| #769 | Dead TrendingAnalysis.ts reference — removed constant, function, and all 4 call sites |
| #772 | Explicit ratings missing source field — added 'explicit' to union type |
| #768 | LoadContext exited with code 1 on error — changed to exit 0 (non-fatal, don't block startup) |
| #766 | DocCrossRefIntegrity used hardcoded voice ID — now reads from getIdentity().mainDAVoiceID |
| File | Fixes |
|---|---|
PAI-Install/engine/actions.ts |
#825 (alias path), #757 (shell detection) |
PAI-Install/install.sh |
#755 (headless CLI fallback) |
statusline-command.sh |
#747 (width cache), #849 (OAuth cross-platform, sed for multibyte) |
hooks/handlers/UpdateCounts.ts |
#819 (algorithmVersion), #849 (OAuth cross-platform) |
hooks/handlers/DocCrossRefIntegrity.ts |
#832 (inference guard), #766 (voice ID from config) |
hooks/WorkCompletionLearning.hook.ts |
#767 (lineageSubKey tracking) |
hooks/RatingCapture.hook.ts |
#769 (dead code removal), #772 (source field) |
hooks/LoadContext.hook.ts |
#768 (exit 0) |
git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git
cd Personal_AI_Infrastructure/Releases/v4.0.2
cp -r .claude ~/ && cd ~/.claude && bash install.sh# 1. Back up
cp -r ~/.claude ~/.claude-backup-$(date +%Y%m%d)
# 2. Clone and copy
git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git
cd Personal_AI_Infrastructure/Releases/v4.0.2
cp -r .claude ~/
# 3. Run the installer
cd ~/.claude && bash install.sh
# 4. Rebuild CLAUDE.md
bun ~/.claude/PAI/Tools/BuildCLAUDE.tsIf you just want the bug fixes without re-running the installer, copy these files from this release over your existing ones:
statusline-command.sh— width cache, OAuth cross-platform, GNU tr fixhooks/handlers/DocCrossRefIntegrity.ts— inference guard, voice ID from confighooks/handlers/UpdateCounts.ts— algorithmVersion, OAuth cross-platformhooks/WorkCompletionLearning.hook.ts— lineageSubKey fixhooks/RatingCapture.hook.ts— dead code removal, source fieldhooks/LoadContext.hook.ts— exit 0 on errorPAI-Install/install.sh— headless/SSH auto-detectionPAI-Install/engine/actions.ts— alias path fix, shell detection
See the main README for the general upgrade procedure. The installer auto-detects existing installations regardless of which version you're upgrading from.