Skip to content

fix(remote): Read Claude chat transcripts from the agent's config dir - #480

Merged
simion merged 4 commits into
simion:mainfrom
earthpyy:ios-no-messages
Dec 1, 2026
Merged

simion merged 4 commits into
simion:mainfrom
earthpyy:ios-no-messages

Conversation

@earthpyy

@earthpyy earthpyy commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On a phone, a Claude task showed "No messages yet." after the user had already messaged the agent.
This happened whenever the agent's Settings env sets CLAUDE_CONFIG_DIR.
The desktop terminal and the phone's Terminal tab both showed the conversation normally.

The transcript reader looked only in ~/.claude/projects/<cwd>/.
With CLAUDE_CONFIG_DIR set, Claude writes its sessions to $CLAUDE_CONFIG_DIR/projects/<cwd>/, so the reader found nothing and returned no turns.
Claude clones (agents that extends Claude) had the same problem plus another one: the reader and chat_supported matched the exact agent id claude, so clones got no chat at all.

The same lookup also feeds the AskUserQuestion answers from the phone (claude_quiz) and termic result, so both were affected.

Changes

  • claude_transcript_file now gets the agent's base id and config dir through a new CliHost::agent_base_and_dir, which uses the existing agent_dirs::instance_config_dir. It looks in the agent's config dir first and falls back to ~/.claude for sessions started before the variable was set.
  • Clones of Claude are accepted, and the pinned session id comes from tabs of the task's own agent or a plain claude tab.
  • The agent is looked up in the task's own profile, and a clone with no env of its own uses its parent's CLAUDE_CONFIG_DIR.
  • Server (SSH) tasks are unchanged and still read the box's ~/.claude, because the box's agent env isn't known here.
    A Claude clone on a server therefore gets no chat, rather than one that stays empty. Docker-sandboxed tasks are not covered either.

Tests

  • make check-all pass.
  • The existing transcript tests pass.
  • cargo test --lib: 1822 passed, 0 failed, including new tests for the relocated dir, the inherited env and the pinned claude tab.

@simion
simion merged commit dbbab3c into simion:main Dec 1, 2026
7 checks passed
@simion

simion commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Merged, thanks. It ships in 2.5.7.

Named accounts work with it too: their projects/ links to the same config dir this reads.
One case left, and it is ours: a clone that inherits CLAUDE_CONFIG_DIR and also has a named account still links that account to ~/.claude, so your fallback is what finds its chat.

simion added a commit that referenced this pull request Dec 1, 2026
Updates download in the background and install on quit or Restart to
update, never under running agents (updates.rs). On Linux a relaunch no
longer goes through AppHandle::restart on the main thread, which skipped
the exit events, so the new process deferred to the old one and quit.

Refs #480

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018opNL4DeF5MZjpvmckKSwo
@earthpyy
earthpyy deleted the ios-no-messages branch December 1, 2026 09:26
@earthpyy

earthpyy commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged, thanks. It ships in 2.5.7.

Named accounts work with it too: their projects/ links to the same config dir this reads. One case left, and it is ours: a clone that inherits CLAUDE_CONFIG_DIR and also has a named account still links that account to ~/.claude, so your fallback is what finds its chat.

Tried and it worked flawless, thanks!

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.

2 participants