You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A relative OSW_CRED_FILEPATH resolves against the MCP client's working directory #197
_resolve_cred_file in src/osw/service/config.py returns an explicitly configured credential path unchanged, apart from the ~ expansion added in #196. A relative value is therefore resolved against the process working directory.
For the CLI that is correct and intended: the user typed the command in that directory.
For the osw-mcp server it is not. The working directory is chosen by the MCP client, and the server does not control it. OSW_MCP_CRED_FILEPATH=accounts.pwd.yaml in a server entry points at an unpredictable location. This is the same unpredictability that _validate_state_dir already rejects for OSW_STATE_DIR, which requires an absolute path.
The failure is loud rather than silent: the run stops with "does not exist". So this is a usability problem, not a correctness problem.
Related decision: #194 asked that relative paths stay accepted, which is why #196 did not change this.
Possible fix: reject a relative credential path when the adapter is osw-mcp, matching the state_dir rule. config.log_prefix() already distinguishes the two adapters. A decision is needed on whether the rule should differ per adapter, or whether the error should only be a warning.
When configuring MCP server a relative path should be resolved immediately to check if it exists. If it doesnt it should be rejected. The relative path is not to be saved but the resolved path
Activity
LukasGold commentedon Sep 22, 2026
When configuring MCP server a relative path should be resolved immediately to check if it exists. If it doesnt it should be rejected. The relative path is not to be saved but the resolved path
fix(mcp): resolve a relative OSW_CRED_FILEPATH at startup