[archon] stripped 22 keys from /Users/rasmus/Projects/cole/Archon (.env, .env.local) to prevent target repo env from leaking into Archon processes
⚠ Detected CLAUDECODE=1 — running inside a Claude Code session.
…
[archon] loaded 3 keys from ~/.archon/.env
[archon] loaded 1 keys from ~/Projects/cole/Archon/.archon/.env (repo scope, overrides user scope)
archon doctor — verifying your setup
{"level":30,"time":1778163281760,"pid":33262,"hostname":"…","module":"cli.doctor","msg":"doctor.run_started"}
{"level":30,"time":1778163281762,"pid":33262,"hostname":"…","module":"db.connection","dbPath":"…","msg":"db.connection_sqlite_selected"}
{"level":30,"time":1778163281776,"pid":33262,"hostname":"…","module":"db.sqlite","msg":"db.sqlite_schema_initialized"}
○ Claude binary: dev mode (SDK resolves via node_modules)
○ gh CLI: GitHub not configured (no GITHUB_TOKEN)
✓ Database: reachable (sqlite)
✓ Workspace: /Users/rasmus/.archon is writable
✓ Bundled defaults: 20 workflow(s), 36 command(s) loaded
○ Slack: no SLACK_BOT_TOKEN set
○ Telegram: no TELEGRAM_BOT_TOKEN set
All checks passed.
{"level":30,"time":1778163281777,"pid":33262,"hostname":"…","module":"cli.doctor","msg":"doctor.run_completed"}
Summary
archon setupwizard andarchon doctorinteractive UX is visually disrupted by three classes of internal log output that leak into the terminal:[archon] stripped …/[archon] loaded …stderr lines from the env loader, before any command-specific code runs.CLAUDECODE=1warning when archon is invoked from inside a Claude Code session, printed before the wizard banner.doctor.run_started,db.connection_sqlite_selected,db.sqlite_schema_initialized,doctor.run_completed) interleaved with the doctor's human-readable○/✓checklist.devafter PR feat(cli): setup overhaul + archon doctor + complete bundled skill #1566 (setup overhaul + archon doctor). Boot stderr predates the overhaul (PR feat(paths/cli/setup): unify env load + write on three-path model (#1302, #1303) #1304, three-path env model).cosmetic(functionality works; the wizard is just visually noisy)Steps to Reproduce
~/.archon/.envand/or<repo>/.archon/.envpresent so the env loader emits log lines.archon doctor(orarchon setup).Expected vs Actual
archon setup,archon doctor) start with their banner/title as the first visible output, and only emit○/✓style human-readable lines while running. Verbose internals available behind--verbose.Sources
packages/paths/src/strip-cwd-env.ts:79-81(stripped) and:88-95(CLAUDECODE warning)packages/paths/src/env-loader.ts:64,78-80(loaded)packages/cli/src/commands/doctor.ts:219,253packages/core/src/db/connection.ts:41,packages/core/src/db/adapters/sqlite.ts:379L1/L2 fire at module-init from
packages/cli/src/cli.ts:12,16-17, before any command can change log level — so a per-commandsetLogLevel('warn')does not help suppress them without a different mechanism.Proposed direction
setup,doctor), default the global Pino level towarnunless--verboseis set. Quick win; suppresses L3/L4.LOG_LEVEL=debugorARCHON_VERBOSE_BOOT=1. Keep the stripped-keys line (security-relevant, tells the operator their target-repo env was discarded). The CLAUDECODE warning could move to the same debug gate now that it has a documented suppress flag (ARCHON_SUPPRESS_NESTED_CLAUDE_WARNING).Environment
Impact
archon setup,archon doctorARCHON_SUPPRESS_NESTED_CLAUDE_WARNING=1for one of three lines; nothing for the others.Scope
cli,paths,corecli:doctor,cli:setup,paths:env-loader,paths:strip-cwd-env,core:db/connection