On this page
Health check utilities for claudewheel.
#claudewheel.health
#claudewheel.health
Pre-launch diagnostics: symlinks, tokens, hooks, permissions, and disk usage.
#HealthResult
Health check result with ok status, label, and detail message.
#check_tmpfs_quota
def check_tmpfs_quota() -> HealthResultCheck /tmp usage percentage via df.
#check_tmp_claude_size
def check_tmp_claude_size() -> HealthResultCheck size of /tmp/claude-$UID/ directory.
#_discover_profiles
def _discover_profiles() -> list[tuple[str, Path]]Find Claude profile dirs via the shared discovery module.
Returns a sorted list of (profile_name, profile_path) tuples.
#check_shared_symlinks
def check_shared_symlinks() -> HealthResultVerify each profile's shared dirs are symlinks to ~/.claudewheel/shared/.
#check_hooks_wired
def check_hooks_wired() -> HealthResultVerify each profile's settings.json has required hooks.
Checks:
- UserPromptSubmit: hook-timestamp
- PreToolUse: hook-block-worktree (matcher: Agent)
#check_settings_defaults
def check_settings_defaults() -> HealthResultVerify each profile enforces expected defaults in settings.json.
#_diff_json
def _diff_json(label: str, canonical: object, actual: object) -> list[str]Return human-readable lines describing differences between two JSON values.
#check_shared_settings_drift
def check_shared_settings_drift() -> HealthResultCompare each profile's hooks and disallowedTools against shared-settings.json.
#check_token_expiry
def check_token_expiry() -> HealthResultWarn if any token is approaching 1-year expiry (setup-token TTL).
#check_tokens
def check_tokens() -> HealthResultVerify each profile has a matching entry in ~/.claudewheel/tokens.json.
#check_orphan_profiles
def check_orphan_profiles() -> HealthResultDetect profile dirs in ~/.claudewheel/profiles/ that are not registered.
A directory is "orphan" if it: - lives in ~/.claudewheel/profiles/ - is NOT discovered by _discover_profiles() (which checks .credentials.json and tokens.json) - is NOT listed in options.json's profile values
For each orphan, we also flag if it contains broken symlinks (symlinks whose target does not exist).
#check_file_permissions
def check_file_permissions() -> HealthResultVerify sensitive files have restrictive permissions (0600).
#check_inode_renames
def check_inode_renames() -> HealthResultDetect directory renames by comparing inode records against the filesystem.
#run_health_check
def run_health_check() -> list[HealthResult]Run all health checks and return results.
#print_health_report
def print_health_report(results: list[HealthResult], file=None) -> NonePrint health check results. Defaults to stdout; pass file=sys.stderr for non-interactive mode.