Skip to content

feat(last): search listed claude profile dirs for an exact session id - #130

Open
sebastianst wants to merge 2 commits into
plannotator:mainfrom
sebastianst:seb/claude-config-dirs
Open

sebastianst wants to merge 2 commits into
plannotator:mainfrom
sebastianst:seb/claude-config-dirs

Conversation

@sebastianst

@sebastianst sebastianst commented Nov 4, 2026 •

Copy link
Copy Markdown

Adds an optional [last] claude_profile_dirs list of Claude Code config dirs to search for a session by its exact id, after CLAUDE_CONFIG_DIR or ~/.claude. Nothing changes without the key.

[last]
claude_profile_dirs = ["~/.claude-max", "~/.claude-work"]

The TUI runs under the Herdr server, which doesn't have the agent's CLAUDE_CONFIG_DIR, so last never finds a session from a Claude Code started with another config dir. If the session isn't found, the error names any listed dir that doesn't exist.

This is a workaround. Herdr's Claude hook already receives the transcript path but drops it. herdrdev/herdr#5330 proposes keeping it on agent_session. With that, herdr last could open the right file directly, and this key could go away.

🤖 Co-created with Claude Opus 5.5

@sebastianst
sebastianst marked this pull request as draft November 4, 2026 15:42
The TUI runs under the Herdr server, which doesn't have the agent's CLAUDE_CONFIG_DIR, so a session of a Claude Code started with another config dir (e.g. ~/.claude-max) was never found. `[last] claude_profile_dirs` lists further config dirs to search, after the configured one. Nothing changes without the key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sebastianst
sebastianst force-pushed the seb/claude-config-dirs branch from 2447341 to 56ae3a8 Compare November 4, 2026 15:50
@sebastianst sebastianst changed the title fix(last): find an exact claude session id in every ~/.claude* config dir feat(last): search listed claude profile dirs for an exact session id Nov 4, 2026
@sebastianst
sebastianst marked this pull request as ready for review November 4, 2026 15:50
…ound

A stale claude_profile_dirs entry was skipped silently, so the error gave no hint why a session wasn't found. A missing dir stays harmless when the session is found elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sebastianst

Copy link
Copy Markdown
Author

hey @backnotprop any chance we could get this in soon? Without it plannotator-tui doesn't work at all for multi-profile setups. I reported the issue upstream (see linked herdr discussion) but they're not very receptive...

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.

1 participant