Problem
The statusline pack (Packs/pai-statusline/src/statusline-command.sh) attempts to read the PAI version from settings.json at .pai.version:
# Line 93-95
PAI_VERSION=$(jq -r '.pai.version // "—"' "$SETTINGS_FILE" 2>/dev/null)
PAI_VERSION="${PAI_VERSION:-—}"
However, Claude Code's settings.json schema does not allow arbitrary fields like pai. Adding this field causes a validation error:
Settings validation failed:
- : Unrecognized field: pai
As a result, the statusline always shows PAI: v— instead of the actual version.
Suggested Fix
The script already sources ~/.claude/.env on line 42:
[ -f "$PAI_DIR/.env" ] && source "$PAI_DIR/.env"
Change the version retrieval to read from the environment variable (with fallback):
# Get PAI version from environment (set in .env) or default
PAI_VERSION="${PAI_VERSION:-2.3}"
And document that users should add PAI_VERSION=2.3 to their ~/.claude/.env.
Affected Files
Packs/pai-statusline/src/statusline-command.sh (lines 93-95)
Releases/v2.3/.claude/statusline-command.sh (same location)
Environment
- Claude Code version: 1.0.33
- PAI version: 2.3
- macOS Darwin 24.6.0
Problem
The statusline pack (
Packs/pai-statusline/src/statusline-command.sh) attempts to read the PAI version fromsettings.jsonat.pai.version:However, Claude Code's
settings.jsonschema does not allow arbitrary fields likepai. Adding this field causes a validation error:As a result, the statusline always shows
PAI: v—instead of the actual version.Suggested Fix
The script already sources
~/.claude/.envon line 42:Change the version retrieval to read from the environment variable (with fallback):
And document that users should add
PAI_VERSION=2.3to their~/.claude/.env.Affected Files
Packs/pai-statusline/src/statusline-command.sh(lines 93-95)Releases/v2.3/.claude/statusline-command.sh(same location)Environment