HKUDS/Vibe-Trading · error · ValueError
VIBE_TRADING_HOME must not be a UNC path: {env_root!r}
Error message
VIBE_TRADING_HOME must not be a UNC path: {env_root!r} What it means
Raised by get_runtime_root when the VIBE_TRADING_HOME environment variable starts with '//' or '\\', i.e. a Windows UNC network path. Runtime state on UNC paths is explicitly unsupported, so config_path-parent, env-root, and session-dir derivation all refuse it.
Source
Thrown at agent/src/config/paths.py:30
def get_runtime_root(config_path: Path | None = None) -> Path:
"""Return the runtime root directory for user-level agent state.
Args:
config_path: Optional explicit config file path. When provided, the
runtime root is derived from that file's parent directory.
Returns:
The directory containing the explicit structured config file when one
is provided, otherwise the ``VIBE_TRADING_HOME`` environment override,
otherwise the default ``~/.vibe-trading`` runtime root.
"""
if config_path is not None:
return config_path.expanduser().parent
env_root = os.environ.get(_HOME_ENV_VAR, "").strip()
if env_root:
if env_root.startswith(("//", "\\\\")):
raise ValueError(
f"{_HOME_ENV_VAR} must not be a UNC path: {env_root!r}"
)
return Path(env_root).expanduser()
return Path.home() / ".vibe-trading"
def get_sessions_dir() -> Path:
"""Return the user-level directory holding chat session records."""
return get_runtime_root() / "sessions"
def get_runs_dir() -> Path:
"""Return the user-level directory holding run artifacts."""
return get_runtime_root() / "runs"
def get_swarm_runs_dir() -> Path:
"""Return the user-level directory holding swarm run records."""View on GitHub (pinned to 80ffdda44c)
Solutions
- Point VIBE_TRADING_HOME at a local drive path, e.g. C:\Users\me\.vibe-trading.
- If the share is required, map it to a drive letter first and use that letter in the env var.
- Unset VIBE_TRADING_HOME to fall back to Path.home() / '.vibe-trading'.
Example fix
# before VIBE_TRADING_HOME=\\fileserver\share\vibe-trading # after VIBE_TRADING_HOME=C:\Users\me\.vibe-trading
Defensive patterns
Strategy: validation
Validate before calling
import os
def runtime_home_valid() -> bool:
v = os.environ.get('VIBE_TRADING_HOME', '').strip()
return not v.startswith(('//', '\\\\')) Prevention
- Use local drive paths (or mapped drive letters) for VIBE_TRADING_HOME on Windows
- Add an env-var sanity check at process start
- Prefer the default ~/.vibe-trading unless a custom location is required
When it happens
Trigger: Setting VIBE_TRADING_HOME=\\server\share\vibe or //server/share/vibe on Windows and then calling anything that resolves the runtime root (_build_welcome_panel, get_sessions_dir, migrate_legacy_state, etc.).
Common situations: Corporate Windows environments with redirected profiles or mapped network home directories; CI runners on network shares; copy-pasting a UNC path into .env.
Related errors
- SWARM_WORKER_RETRY_MAX_DELAY_S must be greater than or equal
- TUSHARE_TOKEN not in agent/.env or environment; required for
- TUSHARE_TOKEN is not configured
- unknown sort {v!r}; expected one of {sorted(_VALID_SORTS)}
- unknown zoo {zoo!r}; expected one of {sorted(_VALID_ZOOS)}
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/70e8af5810d94785.
Report an issue: GitHub.