Bug description
The interactive CLI prints DEBUG noise on every config load:
2026-08-07 07:03:11.495 | DEBUG | core.config:_load_raw:577 - deepcode_config.json not found at /Users/anaheim/deepcode_config.json; skipping layer
The same line appears twice per turn start and around /effort etc. It happens in every directory that has no project-level deepcode_config.json (the common case — the home layer at ~/.deepcode/deepcode_config.json loads fine).
Root cause
setup_logging() in core/observability/bus.py is never called by any CLI entrypoint — it is only defined, never invoked (grep for setup_logging( finds no callers in cli/ or core/). Therefore loguru keeps its built-in default sink (stderr, DEBUG level), and every missing config layer probed by _load_raw() (core/config.py:577) prints a DEBUG line.
Additionally:
LoggerConfig (core/config.py, incl. logger.level) has no consumer — nothing reads the config's logger section to configure loguru, so users cannot silence this via ~/.deepcode/deepcode_config.json.
DEEPCODE_LOG_LEVEL env var is only read in cli/mcp_server.py (MCP server only), not the main CLI.
- The Desktop app is unaffected (it wires
logging.basicConfig in app_server/__main__.py).
Expected behavior
The CLI should call setup_logging(load_config().logger) at startup (TUI and loop entrypoints), defaulting to INFO, and respect logger.level from the config. Note the ordering matters: setup_logging must run before load_config(), because load_config() itself emits the DEBUG lines.
Environment
- deepcode 2.0.0 (via
uv tool install deepcode-hku)
- macOS arm64
- Reproduced with the interactive TUI (
deepcode) and in loop mode
Suggested fix
# in cli/tui/app.py main() and cli/loop_cli.py main(), before anything loads config:
from core.config import LoggerConfig, load_config
from core.observability import setup_logging
setup_logging(LoggerConfig(transports=["console"]))
cfg = load_config()
if cfg.logger.level.upper() != "INFO":
setup_logging(LoggerConfig(level=cfg.logger.level, transports=["console"]), force=True)
Bug description
The interactive CLI prints DEBUG noise on every config load:
The same line appears twice per turn start and around
/effortetc. It happens in every directory that has no project-leveldeepcode_config.json(the common case — the home layer at~/.deepcode/deepcode_config.jsonloads fine).Root cause
setup_logging()incore/observability/bus.pyis never called by any CLI entrypoint — it is only defined, never invoked (grep forsetup_logging(finds no callers incli/orcore/). Therefore loguru keeps its built-in default sink (stderr, DEBUG level), and every missing config layer probed by_load_raw()(core/config.py:577) prints a DEBUG line.Additionally:
LoggerConfig(core/config.py, incl.logger.level) has no consumer — nothing reads the config'sloggersection to configure loguru, so users cannot silence this via~/.deepcode/deepcode_config.json.DEEPCODE_LOG_LEVELenv var is only read incli/mcp_server.py(MCP server only), not the main CLI.logging.basicConfiginapp_server/__main__.py).Expected behavior
The CLI should call
setup_logging(load_config().logger)at startup (TUI and loop entrypoints), defaulting to INFO, and respectlogger.levelfrom the config. Note the ordering matters:setup_loggingmust run beforeload_config(), becauseload_config()itself emits the DEBUG lines.Environment
uv tool install deepcode-hku)deepcode) and inloopmodeSuggested fix