Skip to content

Kanban runtime TERMINAL_CWD is misreported as a deprecated .env setting #86393

Description

@Datawav

Summary

Hermes Kanban workers set TERMINAL_CWD at runtime to the task workspace, but CLI startup reports that value as a deprecated .env setting on every worker run.

Reproduction

On Hermes v2026.8.13, dispatch a Kanban task with a directory workspace. Its task log begins with output equivalent to:

Deprecated .env settings detected:
TERMINAL_CWD=/workspace found in .env — this is deprecated.
Then remove the old entries from <profile>/.env

There is no TERMINAL_CWD entry in the root, profile, or project .env files. hermes_cli.kanban_db._default_spawn() sets env["TERMINAL_CWD"] = workspace deliberately. hermes_cli.config.warn_deprecated_cwd_env_vars() checks only os.environ, so it cannot distinguish that supported runtime injection from a dotenv-loaded legacy value.

Impact

  • Every ordinary Kanban worker writes a false warning to its task log.
  • Operators are told to edit a file that does not contain the setting.
  • Warning-based soak/health monitoring cannot distinguish configuration drift from normal worker startup.

Expected behavior

Warn only when the deprecated key was actually loaded from a dotenv source. Runtime-owned TERMINAL_CWD used to bind a Kanban worker to its workspace should remain supported and silent.

One possible approach is for dotenv loading to record the keys/sources it supplied and have warn_deprecated_cwd_env_vars() consult that provenance instead of treating every environment value as dotenv-derived.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/configConfig system, migrations, profilescomp/cliCLI entry point, hermes_cli/, setup wizardcomp/cronCron scheduler and job managementduplicateThis issue or pull request already existssweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradestype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions