NousResearch/hermes-agent

HERMES_CRON_SESSION env var leaking into interactive gateway sessions

Cluster 37968 · cron · Bug. Data as of

8 open items. Fix merged in #77022 on 2 Aug 2026. Check it covers your case.

The short answer

1open issue
7open PRs
23items grouped
Known?
Yes. 23 related items grouped here, 6 issues already closed.
Fix event
A fix was merged to main in PR #77022. Check it covers your case. No release data is tracked. Fix link checked: 2 Aug 2026.
Tracker
The maintainers' tracker marks this partially resolved, deciding PR #77022. That is separate from the fix event.

Nearly all members concern the process-wide HERMES_CRON_SESSION marker set by the in-process cron ticker, which is reported to affect approval behavior (e.g., blocking execute_code) in interactive gateway sessions, along with proposed cleanup, restoration, or scoping changes. One member, about gating unattended VCS mutations, appears only loosely related.

Open issues1

  • Issue#60350[Bug] execute_code blocked in WeCom gateway session — HERMES_CRON_SESSION env var leaks from in-process cron ticker (corroborating #56771)

Open PRs7

  • PR#29854fix(cron): restore cron session environment after jobs
  • PR#35515fix(cron): restore cron session env after jobs
  • PR#56784fix(approval): let gateway session indicators override process-wide cron flag
  • PR#57124fix(cron): clean up HERMES_CRON_SESSION env var after each job run (#56771)
  • PR#59719fix(cron): scope approval marker to cron execution context (#58662)
  • PR#60077fix(approval): gate unattended VCS mutations
  • PR#60611fix(cron): clean up HERMES_CRON_SESSION env var after job completes (#60350)

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #77022 fix(cron): scope cron approval context per session

    merged to main

    files: acp_adapter/server.py, cron/scheduler.py, gateway/platforms/api_server.py, gateway/run.py, gateway/session_context.py, tests/cron/conftest.py, tests/cron/test_scheduler_cron_session_isolation.py, tests/gateway/test_session_env.py, tests/tools/test_cron_approval_mode.py, tests/tools/test_execute_code_approval_cluster.py, tests/tools/test_request_tool_approval.py, tools/approval.py, tools/environments/base.py, tui_gateway/server.py

8 PRs closed without merging

From the close comments: merged via another change 3 · done elsewhere 1 · duplicate 1 · superseded by another PR 1 · other 2

  • #37969 fix(cron): isolate gateway approvals from environment pollution · merged via another change → #77022, #43370
  • #43370 Fix cron session context isolation · merged via another change → #77022
  • #43549 fix(cron): restore HERMES_CRON_SESSION after jobs · merged via another change → #77022
  • #56788 fix(approval): ignore leaked HERMES_CRON_SESSION in interactive sessions (#56771) · other → #56771, #56784, #56796
  • #56796 fix(approval): use per-job ContextVar for cron-session flag instead of leaking env var (#56771) · other → #56771, #57736, #60350, #56796, #57124, #59242, #56784, #57169, #36004
Show 3 more
  • #58663 fix(security): scope the cron-session approval marker to the job context · done elsewhere → a168b59
  • #59242 fix(cron): clean up HERMES_CRON_SESSION env var after each job run (#59236) · duplicate → #57124
  • #60386 fix(cron): clean up HERMES_CRON_SESSION env var after each job to prevent process-wide leak into gateway sessions · superseded by another PR → #57124, #56771, #59242, #56796, #56784
Closed issues · 6
  • Closed#37968fix(cron): isolate gateway approvals from environment pollution
  • Closed#56771[Bug]: `execute_code` blocked in interactive Telegram gateway session because `HERMES_CRON_SESSION` env var leaks from cron scheduler into user's shell
  • Closed#57736HERMES_CRON_SESSION set process-globally: interactive gateway sessions inherit cron approval policy after any cron runs
  • Closed#58662[Bug]: in-process cron ticker leaks its approval marker into interactive gateway sessions
  • Closed#59236Follow up: avoid process-wide cron marker leaking into later interactive gateway approvals
  • Closed#60997fix: HERMES_CRON_SESSION env var leaks into global process context, blocking execute_code in user sessions
How this cluster was grouped
  • Link evidence (partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
  • Members outside that structural core may belong to a different underlying problem.
  • Pairwise link density 0.10: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

For your agent

The same facts, typed.