Summary
After installing Hermes, unrelated CLI/automation processes that happen to inherit HERMES_HOME start failing when running lark-cli.
lark-cli detects a Hermes context and refuses to use the existing local lark-cli config, returning:
{
"ok": false,
"error": {
"type": "config",
"subtype": "not_configured",
"message": "hermes context detected but lark-cli is not bound to it",
"hint": "read `lark-cli config bind --help`, then ask the user to confirm intent and identity preset..."
}
}
However, when trying to bind Hermes explicitly, lark-cli does not appear to use the HERMES_HOME path that triggered Hermes detection. Instead, it looks for a different default path:
{
"ok": false,
"error": {
"type": "config",
"subtype": "invalid_config",
"message": "failed to read Hermes config: open C:\\Users\\example\\.hermes\\.env: The system cannot find the path specified.",
"hint": "verify Hermes is installed and configured at C:\\Users\\example\\.hermes\\.env"
}
}
In this environment, HERMES_HOME points somewhere else, for example:
HERMES_HOME=C:\Users\example\AppData\Local\hermes
Expected behavior
If lark-cli detects Hermes because HERMES_HOME is present, then one of the following should happen:
config bind --source hermes should read Hermes config from HERMES_HOME, or
lark-cli should not enter Hermes context unless Hermes config can actually be resolved, or
- there should be a documented way to force normal local config mode, e.g. an env var or flag like
--ignore-agent-context.
Actual behavior
Any unrelated process that inherits HERMES_HOME is treated as Hermes context.
This breaks existing lark-cli usage in non-Hermes automation tasks. Commands such as:
lark-cli auth status
lark-cli config show
lark-cli im +chat-messages-list --as user ...
fail before using the existing local config.
If HERMES_HOME is removed from the current shell, the same commands work again and use the normal local config:
Remove-Item Env:HERMES_HOME -ErrorAction SilentlyContinue
lark-cli auth status
Reproduction
- Have a working local
lark-cli config.
- Install Hermes or otherwise set
HERMES_HOME to a Hermes data directory.
- In a non-Hermes shell or automation process that inherits
HERMES_HOME, run:
- Observe
hermes context detected but lark-cli is not bound to it.
- Try:
lark-cli config bind --source hermes --identity user-default
- Observe that bind looks for
C:\Users\example\.hermes\.env instead of the path from HERMES_HOME.
Impact
This causes unrelated automation jobs that use lark-cli to fail after Hermes is installed, even though those jobs are not Hermes jobs and already have a valid local lark-cli config.
Version
Summary
After installing Hermes, unrelated CLI/automation processes that happen to inherit
HERMES_HOMEstart failing when runninglark-cli.lark-clidetects a Hermes context and refuses to use the existing local lark-cli config, returning:{ "ok": false, "error": { "type": "config", "subtype": "not_configured", "message": "hermes context detected but lark-cli is not bound to it", "hint": "read `lark-cli config bind --help`, then ask the user to confirm intent and identity preset..." } }However, when trying to bind Hermes explicitly,
lark-clidoes not appear to use theHERMES_HOMEpath that triggered Hermes detection. Instead, it looks for a different default path:{ "ok": false, "error": { "type": "config", "subtype": "invalid_config", "message": "failed to read Hermes config: open C:\\Users\\example\\.hermes\\.env: The system cannot find the path specified.", "hint": "verify Hermes is installed and configured at C:\\Users\\example\\.hermes\\.env" } }In this environment,
HERMES_HOMEpoints somewhere else, for example:Expected behavior
If
lark-clidetects Hermes becauseHERMES_HOMEis present, then one of the following should happen:config bind --source hermesshould read Hermes config fromHERMES_HOME, orlark-clishould not enter Hermes context unless Hermes config can actually be resolved, or--ignore-agent-context.Actual behavior
Any unrelated process that inherits
HERMES_HOMEis treated as Hermes context.This breaks existing
lark-cliusage in non-Hermes automation tasks. Commands such as:fail before using the existing local config.
If
HERMES_HOMEis removed from the current shell, the same commands work again and use the normal local config:Reproduction
lark-cliconfig.HERMES_HOMEto a Hermes data directory.HERMES_HOME, run:lark-cli auth statushermes context detected but lark-cli is not bound to it.C:\Users\example\.hermes\.envinstead of the path fromHERMES_HOME.Impact
This causes unrelated automation jobs that use
lark-clito fail after Hermes is installed, even though those jobs are not Hermes jobs and already have a valid local lark-cli config.Version