Skip to content

Add env snapshot capture for session debugging#448

Merged
bmbouter merged 1 commit intomainfrom
env-snapshot-feature
Apr 23, 2026
Merged

Add env snapshot capture for session debugging#448
bmbouter merged 1 commit intomainfrom
env-snapshot-feature

Conversation

@bmbouter
Copy link
Copy Markdown
Owner

Summary

Every session now captures a redacted environment variable snapshot at startup. Reuses the debug-env binary (already baked into Skiff) for env classification, redaction, and formatting — single source of truth.

Changes

  • skiff-init runs /usr/local/bin/debug-env at startup, sends output to Ledger
  • New env_snapshot TEXT column on sessions table (migration 032)
  • New POST /api/v1/sessions/{id}/env-snapshot ingestion endpoint (auth bypass for session token, same as transcript/status)
  • Session detail API includes env_snapshot field
  • New "Environment" tab in session detail UI
  • Color-coded display: [REDACTED] in red, [DUMMY] in yellow

Test evidence

Verified in local dev environment: dispatched session, env snapshot captured (2285 chars), visible in API response with all env vars properly categorized and redacted.

🤖 Generated with Claude Code

Every session now captures a redacted environment variable snapshot
at startup using the debug-env tool (reuses existing redaction logic).
The snapshot is stored in the session record and displayed in the UI
under a new "Environment" tab on the session detail page.

This enables debugging env var issues (like missing GH_HOST, wrong
proxy settings, or credential conflicts) by showing exactly what
was set when the session ran.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bmbouter bmbouter merged commit c32c805 into main Apr 23, 2026
16 of 20 checks passed
@bmbouter bmbouter deleted the env-snapshot-feature branch April 23, 2026 16:28
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