feat: v4 agent observability + SSH remote deploy#80
Merged
itscooleric merged 8 commits intodevfrom Mar 16, 2026
Merged
Conversation
Enables SSH-based remote build/deploy workflow from clide to forge-edge VPS. Previous session added these to the Dockerfile but never committed, so rebuilds used the stale committed version without these packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The `script` command captures raw VT100 byte streams which are unreadable for TUI apps like Claude Code (29K+ ANSI escapes, 15K+ carriage returns, character-by-character cursor positioning). Instead, harvest Claude Code's native JSONL conversation logs from ~/.claude/projects/<project>/<uuid>.jsonl after session end. These contain structured user messages, assistant responses (with thinking blocks), tool_use calls, and tool_results — actually useful data. Changes: - Snapshot Claude session files before run, diff after to find new ones - Symlink conversation.jsonl into clide session directory - Demote raw script capture to opt-in (CLIDE_RAW_TRANSCRIPT=1) - Rename transcript.txt → transcript.raw (signals it's not readable) - session_end event now includes claude_session_id and has_conversation Addresses #42 (transcript capture) and #41 (structured logging spike). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bake branch@hash (date) into the Docker image via BUILD_VERSION arg, show it in the CLI splash banner and web entrypoint logs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The session-logger cleanup code (conversation harvesting, session_end event, transcript compression) was unreachable when the agent was killed rather than exiting cleanly. This caused events.jsonl to only contain session_start, conversation.jsonl to never be linked, and raw transcripts to remain uncompressed. Move all cleanup into a trap handler for EXIT/INT/TERM/HUP so it runs regardless of how the session ends. Also show the splash banner in .bashrc so it appears in the ttyd web terminal on connect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of waiting until session cleanup to discover and symlink the Claude Code conversation JSONL, spawn a lightweight background watcher that polls for up to 60s until the file appears, then links it immediately. Since Claude Code writes to this file continuously, the conversation log is readable live throughout the entire session. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Symlinks pointed to paths inside the clide container that don't exist on the host or in other containers (e.g. Clem file explorer). Now: - Background watcher copies the file and re-syncs every 30s - Cleanup does a final copy instead of symlink - Source path stored in .conv_source for cleanup to find Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude Code creates its JSONL session files with 600 permissions. When session-logger.sh copies them, the restrictive permissions are preserved, causing CLEM's file explorer to get 403 Forbidden. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 16, 2026
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.
Summary
scripts/session-logger.sh,docs/schema/session-events-v1.md)scripts/notify.sh)openssh-clientandrsyncto enable remote build/deploy to forge-edge VPS (Add openssh-client to Dockerfile for remote build/deploy #79)CLIDE_CA_URLfor internal TLSCommits (19)
Full v4 observability feature set plus the SSH tooling needed for cloperator's remote deploy workflow.
Test plan
--no-cacheand verifyssh,ssh-keygen,rsyncare available/workspace/.clide/sessions/🤖 Generated with Claude Code