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
# Precondition: profile "token-plan" is stored in ~/.bailian/config.json with# api_key, base_url, workspace_id and a console token, but is NOT the active profile.# 1. Address it with the documented --config global flag
bl --config token-plan config show
bl --config token-plan auth status
# 2. Activate the very same profile and repeat
bl config use --name token-plan
bl config show
bl auth status
Expected
--config <profile> selects and loads that profile's credentials, as documented
("Use a config profile from ~/.bailian/config.json"). Step 1 and step 2 should
report the same api_key / base_url / console gateway for the same profile.
Actual
Step 1 emits no config values at all — config show falls through to the
generic welcome/command list, and auth status reports the profile as
unauthenticated. Step 2 prints the credentials correctly:
The profile is fully populated; only the --config addressing path fails to load it.
Full output
$ bl --config token-plan config show
>>> no key/value lines emitted; the generic command list is printed instead
$ bl --config token-plan auth status
>>> generic command list printed; profile reported as unauthenticated
Exit code: 0
The exit code is 0, so this is not even detectable as a failure by scripted
callers. An agent or CI wrapper that passes --config silently runs
unauthenticated (or against the wrong profile) rather than erroring out.
JSON error (if any)
None — the command exits 0 and emits no error object, so there is nothing for a
caller to branch on.
Already tried
bl update (1.28.0 → 2.0.1) and bl skill update; CLI and skill versions
aligned at 2.0.1 before reproducing
Reproduced on two different non-active profiles: the pre-existing token-plan, and a freshly created profile produced by bl auth login --console --console-site international --config <name>
Confirmed both profiles work immediately after bl config use --name <profile>,
then break again when addressed via --config
Eliminated env-var precedence as a cause: bl config show documents flag > env > config, and the repro was run with DASHSCOPE_API_KEY fully
unset from the environment, so nothing was shadowing the stored key
Notes
Frequency: always — deterministic, reproduced repeatedly on both profiles
Impact: multi-profile workflows are effectively unusable. bl auth login --console --config <name> does create a fully populated
profile, but that profile cannot then be used via --config. The only way to
reach it is bl config use --name <name>, which changes global state and
disrupts whatever profile was in active use — so the flag's stated purpose
("Use a config profile") is not achievable.
Suggested fix: either make --config load the named profile's credentials
as documented, or fail loudly (non-zero exit + explicit message) when the
named profile cannot be resolved. Silently exiting 0 with unauthenticated
behaviour is the worst of the two outcomes for automation.
Related observation (separate from this bug, reporting only in case it is the
same root cause): bl auth login appears to reset workspace_id on the
target profile back to the account's default workspace, even after it had been
set explicitly with bl config set --key workspace_id. We observed it revert
once and had to re-apply the value.
Environment
Reproduce
Expected
--config <profile>selects and loads that profile's credentials, as documented("Use a config profile from ~/.bailian/config.json"). Step 1 and step 2 should
report the same
api_key/base_url/ console gateway for the same profile.Actual
Step 1 emits no config values at all —
config showfalls through to thegeneric welcome/command list, and
auth statusreports the profile asunauthenticated. Step 2 prints the credentials correctly:
The profile is fully populated; only the
--configaddressing path fails to load it.Full output
The exit code is 0, so this is not even detectable as a failure by scripted
callers. An agent or CI wrapper that passes
--configsilently runsunauthenticated (or against the wrong profile) rather than erroring out.
JSON error (if any)
None — the command exits 0 and emits no error object, so there is nothing for a
caller to branch on.
Already tried
bl update(1.28.0 → 2.0.1) andbl skill update; CLI and skill versionsaligned at 2.0.1 before reproducing
token-plan, and a freshly created profile produced bybl auth login --console --console-site international --config <name>bl config use --name <profile>,then break again when addressed via
--configbl config showdocumentsflag > env > config, and the repro was run withDASHSCOPE_API_KEYfullyunset from the environment, so nothing was shadowing the stored key
Notes
blnon-interactivelybl auth login --console --config <name>does create a fully populatedprofile, but that profile cannot then be used via
--config. The only way toreach it is
bl config use --name <name>, which changes global state anddisrupts whatever profile was in active use — so the flag's stated purpose
("Use a config profile") is not achievable.
--configload the named profile's credentialsas documented, or fail loudly (non-zero exit + explicit message) when the
named profile cannot be resolved. Silently exiting 0 with unauthenticated
behaviour is the worst of the two outcomes for automation.
same root cause):
bl auth loginappears to resetworkspace_idon thetarget profile back to the account's default workspace, even after it had been
set explicitly with
bl config set --key workspace_id. We observed it revertonce and had to re-apply the value.
class of symptom, different mechanism.