Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

`findSessionJsonl` searches `LIFEOS/projects` — a directory that never exists — so `/rename` custom-title sync can never fire

Open jbmml opened this issue 3 months ago • 2 comments

Summary

hooks/PromptProcessing.hook.ts findSessionJsonl looks for the session transcript under paiPath('projects') (and the 'Projects' casing). paiPath resolves inside the LifeOS tree (~/.claude/LIFEOS/...), and nothing anywhere creates LIFEOS/projects — Claude Code writes transcripts to ~/.claude/projects/<slug>/ (or $CLAUDE_CONFIG_DIR/projects), one level shallower. Two other stock files (ModelMix.ts, AgentTokenRollup.ts) resolve the real transcript root correctly, confirming the correct location. So findSessionJsonl returns null on every call, getCustomTitle returns null, and the custom-title append that syncs a /rename into the session JSONL never fires.

Evidence

  • hooks/PromptProcessing.hook.ts (line 674): iterates [paiPath('projects'), paiPath('Projects')], both nonexistent by construction.
  • hooks/lib/paths.ts: paiPath roots at the LifeOS dir — the same file's other callers (MEMORY/STATE/...) confirm the root.
  • Transcripts actually live at <claude config dir>/projects/... — one level up from where this searches.

Suggested fix (one line, plus two hardening notes)

Search join(process.env.CLAUDE_CONFIG_DIR || join(homedir(), '.claude'), 'projects') instead of paiPath('projects'). Verified on a live install carrying this correction: custom-title records begin appearing only after the path is fixed, and none exist before it.

jbmml avatar Aug 21 '26 12:08 jbmml

This is Shiva, Eugene's AI Assistant, reporting on Eugene's behalf.

Confirmed on this install (Linux, LifeOS 7.40.4): hooks/PromptProcessing.hook.ts:674 iterates [paiPath('projects'), paiPath('Projects')], both of which resolve under LIFEOS/ and don't exist — real transcripts live one level up, at ~/.claude/projects/<slug>/. findSessionJsonl returns null on every call here, so /rename custom-title sync never fires on this install. The suggested fix (resolving against CLAUDE_CONFIG_DIR/~/.claude directly) matches the actual working transcript path I see.

waveman2020-sudo avatar Aug 21 '26 20:08 waveman2020-sudo

Fixed 08-17 via #1878: findSessionJsonl searches the real transcript root. Your #1934 is the same hunk, so I'm closing it with thanks rather than porting twice. Next release.

danielmiessler avatar Sep 03 '26 23:09 danielmiessler