Repository navigation
feat(capture): capture host-Claude terminal conversations via transcript-tail - #415
Merged
Merged
Conversation
…ipt-tail Branch 2 of the host-terminal-replaces-chat stack. Moves conversation capture for the host Claude terminal off the (retiring) chat-stream wrap and onto the same transcript-tail path that already captures the sandbox's own Claude. The host terminal's `claude` writes to a DEDICATED CLAUDE_CONFIG_DIR (~/.corral/host-claude-config) so its transcripts live in a tree corral owns and the tailer attributes unambiguously to the host origin — the sandbox's Claude otherwise writes to the same ~/.claude/projects/<slug> dir, indistinguishable on disk. The dedicated dir shares auth/settings/plugins with ~/.claude via per-entry symlinks (everything but projects/), so /login, settings and skills behave exactly as in the user's normal claude; only the transcript stream diverges. User-placed real files in the config dir are never clobbered. The tailer is generalized over a convOriginProfile (origin kind + conv-key prefix + parent resolver); the sandbox sweep is unchanged, a host sweep is added over hostClaudeProjectsDir gated on the -claude tmux session being live. tailSandboxFile/ingestSandboxLine become tailTranscriptFile/ingestTranscriptLine. Tests: config-dir seeding (separate projects/, shared symlinks, no clobber). Global (project-less) host terminal capture deferred with the global terminal itself. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Branch 2 of 4 in replacing the bespoke ChatDock host chat with a real terminal (stacked on #414).
Moves conversation capture for the host Claude terminal off the (retiring) chat-stream wrap and onto the same transcript-tail path that already captures the sandbox's own Claude (
sandbox_conv_tail.go).The disambiguation problem
The host terminal's
clauderuns in the same workspace cwd as the sandbox's Claude, so by default both write to~/.claude/projects/<slug>/— indistinguishable on disk.Fix: point the host terminal at a dedicated
CLAUDE_CONFIG_DIR(~/.corral/host-claude-config) so its transcripts land in a corral-owned tree the tailer reads as host-origin.CLAUDE_CONFIG_DIRrelocates the whole config dir, so the dedicated dir shares auth/settings/plugins with~/.claudevia per-entry symlinks (everything butprojects/) —/login, settings, and skills behave exactly as in the user's normal claude; only the transcript stream diverges. User-placed real files are never clobbered.(Confirmed
CLAUDE_CONFIG_DIRbehavior against the Claude Code sessions docs.)Details
convOriginProfile(origin kind + conv-key prefix + parent resolver). Sandbox sweep unchanged; a host sweep is added overhostClaudeProjectsDir, gated on the-claudetmux session being live.tailSandboxFile/ingestSandboxLine→tailTranscriptFile/ingestTranscriptLine.handleClaudeHostWSnow launchesclaudeunder the dedicated config dir.Deferred
Global (project-less) host-terminal capture lands with the global terminal itself (later branch).
Test
host_claude_config_test.go— separateprojects/, shared symlinks, idempotent, no-clobber. Build/vet/tests green.🤖 Generated with Claude Code