Skip to content

fix: clean auth + v5 container monitoring (#95, #45-48)#96

Merged
itscooleric merged 5 commits intodevfrom
fix/clean-auth-login
Mar 24, 2026
Merged

fix: clean auth + v5 container monitoring (#95, #45-48)#96
itscooleric merged 5 commits intodevfrom
fix/clean-auth-login

Conversation

@itscooleric
Copy link
Copy Markdown
Owner

Summary

Test plan

  • Verify claude /login works in a fresh container without CLAUDE_CODE_SIMPLE interfering
  • Verify claude (no args) still launches through session-logger normally
  • Check current.json is written to /workspace/.clide/metrics/ after container start
  • Kill ttyd manually (kill $(pgrep ttyd)) and verify it restarts with log message
  • Set CLIDE_METRICS_DISABLED=1 and verify poller doesn't start
  • Open/close web terminal and check session_events.jsonl for open/close events

🤖 Generated with Claude Code

itscooleric and others added 5 commits March 22, 2026 20:36
CLAUDE_CODE_SIMPLE no longer defaults to 1 — was needed for the old
auto-launch-Claude flow but blocks interactive login now that clide
launches to bash. Auth subcommands (/login, /logout, etc.) bypass
session-logger and run the claude binary directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…yd supervision (#45-48)

- Resource poller (#45): reads /proc + cgroup v2 for CPU, memory, PIDs,
  FDs, zombies. Writes metrics.jsonl time series every 30s.
- ttyd session tracking (#46): polls ss for connections, emits
  session_open/session_close events to session_events.jsonl.
- ttyd supervision (#47): restart loop with exponential backoff (max 5
  rapid restarts). Clean shutdown signals propagate normally.
- Metrics file for Clem (#48): atomic current.json with latest snapshot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…bility

README:
- Auth section rewritten: `claude /login` is now primary, env vars are
  for headless/CI. Removed stale `setup-token` references.
- Web terminal auth documented as required (was misleading "optional")
  with all three modes (basic auth, proxy, no-auth).
- Added egress audit, intercept proxy, and container monitoring sections.
- Fixed CLIDE_MAX_SESSIONS default (0, not 30).
- Session logging section updated with full directory layout.
- Version bump v4 → v5 in banner.

RUNBOOK:
- OAuth rotation now shows `claude /login` as primary path.
- Added `current.json` metrics check to health section.
- Added ttyd crash recovery troubleshooting.
- Fixed auth troubleshooting to mention all three auth modes.

observability.md:
- Added v5 container monitoring section (current.json, metrics.jsonl,
  session tracking, ttyd supervision).
- Fixed bogus token example (159M tokens / $343 → 166K / $1.04).
- Simplified pricing table (removed cache columns — script handles it).
- Fixed MITM cert section (ssl_insecure makes CA install unnecessary).
- Fixed bad hostname (objects/raw/uploads → objects + raw).
- Added monitoring layer to summary table.

session-events-v1.md:
- Expanded session_end schema with all fields actually emitted (tokens,
  cost, signal, claude_session_id, turns).
- Fixed CLIDE_MAX_SESSIONS default to 0 in both retention text and table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@itscooleric itscooleric merged commit 99d2b2d into dev Mar 24, 2026
4 checks passed
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