Skip to content

bug(config): default config/default.toml not found when launched from IDE (ACP CWD mismatch) #1945

@bug-ops

Description

@bug-ops

Problem

resolve_config_path() falls back to config/default.toml relative to process CWD.

  • CLI / TUI: launched manually from project root — CWD is predictable, default works.
  • ACP stdio / ACP HTTP: launched by an IDE (Zed, VS Code, Helix) — CWD is the user's
    workspace directory, not the Zeph project directory. config/default.toml does not
    exist there, so startup fails with a file-not-found error or silently uses defaults.

ACP users are forced to always pass --config <absolute-path> or set ZEPH_CONFIG.
No automatic fallback to a well-known location exists.

Expected behavior

All modes should be able to locate a default config without requiring an explicit flag.
Proposed resolution order extension:

  1. --config <PATH>
  2. ZEPH_CONFIG
  3. config/default.toml (relative to CWD — preserves CLI/TUI behavior)
  4. ~/.config/zeph/config.toml (XDG fallback for IDE/ACP launch context)

Acceptance Criteria

  • resolve_config_path() tries ~/.config/zeph/config.toml as final fallback
  • Only reached if CWD-relative path does not exist (no behavior change for CLI/TUI)
  • Startup log emits a DEBUG message with the resolved path and which step matched
  • Unit test covers: CLI flag, env var, CWD fallback, XDG fallback, all-missing error
  • 020-config-loading/spec.md resolution order updated to reflect the new step 4

Files

  • crates/zeph-core/src/bootstrap/config.rsresolve_config_path()
  • .local/specs/020-config-loading/spec.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    acpAgent Client Protocol integrationbugSomething isn't workingconfigConfiguration file changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions