sleep: a claude_home or codex_home starting with ~ is not expanded, so nothing is harvested and the skill and state land under ./~
claude_home and codex_home are used as given, with no ~ expansion. JSON and YAML config files are not shell-expanded, so "claude_home": "~/.claude-work" in ~/.skillopt-sleep/config.json is read as a relative path named ~. pi_home and cursor_home are already expanded (pi_sessions_dir, cursor_projects_dir), and so is claude_home in skill_resolver.py.
Commit: 45f65ca04f5f6713bca7b9797b495696ba812751
https://github.com/microsoft/SkillOpt/blob/45f65ca04f5f6713bca7b9797b495696ba812751/skillopt_sleep/config.py#L118-L141 https://github.com/microsoft/SkillOpt/blob/45f65ca04f5f6713bca7b9797b495696ba812751/skillopt_sleep/config.py#L176-L182
What goes wrong:
transcripts_dirandhistory_pathpoint at~/.claude-work/...literally. The directory does not exist, so the Claude harvest finds no sessions and the night reports nothing to learn.skills_dir/managed_skill_path()point at./~/.claude-work/skills/..., so an adopted skill is written under a~folder in the current directory, where Claude Code never loads it.state_dircomparesabspath("~/.claude-work")with the real home, so state moves to./~/.skillopt-sleep. This happens even for"claude_home": "~/.claude", which is the default.codex_archived_sessions_dirhas the same problem forcodex_home.--claude-homeand--codex-homecallos.path.abspathwithoutexpanduser, unlike--pi-homeand--cursor-home. A quoted--claude-home "~/.claude-work", or a shell that does not expand~, hits the same paths.
Repro:
from skillopt_sleep.config import SleepConfig, DEFAULTS
cfg = SleepConfig(data={**DEFAULTS, "claude_home": "~/.claude-work"})
print(cfg.transcripts_dir) # ~/.claude-work/projects
print(cfg.managed_skill_path()) # ~/.claude-work/skills/skillopt-sleep-learned/SKILL.md
print(cfg.state_dir) # <cwd>/~/.skillopt-sleep
cfg = SleepConfig(data={**DEFAULTS, "claude_home": "~/.claude"})
print(cfg.state_dir) # <cwd>/~/.skillopt-sleep, not ~/.skillopt-sleep
Expected: ~ expands to the home directory, as it does for pi_home and cursor_home.
Actual: the paths stay relative to the current directory, so nothing is harvested and the skill and state are written under ./~.
I have a fix with a regression test and will open a PR.