_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.
_resolve_cred_fileinsrc/osw/service/config.pyreturns 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.yamlin a server entry points at an unpredictable location. This is the same unpredictability that_validate_state_diralready rejects forOSW_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_dirrule.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.