Skip to content

Conversation

@hjbrandt
Copy link

Summary

Fixed three critical issues causing hook failures on startup:

  1. session-start-hook.ts: Corrected PAI_DIR fallback path from ${HOME}/PAI/PAI_DIRECTORY to ${HOME}/PAI
  2. stop-hook.ts: Replaced hardcoded iCloud path with dynamic ${PAI_DIR}/voice-server/voices.json for better portability
  3. update-tab-titles.ts: Removed reference to non-existent update-tab-title.ts file

Changes

  • All hooks now use consistent PAI_DIR environment variable resolution
  • Voice server path is now portable across installations
  • Hooks handle missing voice server gracefully with fallback configs

Testing

Verified all three hooks execute without errors:

  • ✅ SessionStart hook sets initial tab title
  • ✅ UserPromptSubmit hook updates tab title
  • ✅ Stop hook sends notifications and updates final title

Fixes

Resolves the following errors:

  • SessionStart:startup hook error
  • UserPromptSubmit hook error
  • Stop hook error

Fixed three critical issues causing hook failures:

1. **session-start-hook.ts**: Corrected PAI_DIR fallback path from
   `${HOME}/PAI/PAI_DIRECTORY` to `${HOME}/PAI`

2. **stop-hook.ts**: Replaced hardcoded iCloud path with dynamic
   `${PAI_DIR}/voice-server/voices.json` for better portability

3. **update-tab-titles.ts**: Removed reference to non-existent
   `update-tab-title.ts` file that was causing spawn errors

All hooks now use consistent PAI_DIR environment variable resolution
and handle missing voice server gracefully with fallback configs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only typo, right? Should be update-tab-titles.ts?

@danielmiessler
Copy link
Owner

Fixed this one.

@hjbrandt hjbrandt deleted the fix/hook-path-errors branch October 20, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants