Skip to content

fix(oneshot): hermes -z returns empty stdout; fix(cron): whatsapp delivery silently dropped - #23067

Closed
Bartok9 wants to merge 1 commit into
NousResearch:mainfrom
Bartok9:fix/22975-oneshot-empty-stdout
Closed

fix(oneshot): hermes -z returns empty stdout; fix(cron): whatsapp delivery silently dropped#23067
Bartok9 wants to merge 1 commit into
NousResearch:mainfrom
Bartok9:fix/22975-oneshot-empty-stdout

Conversation

@Bartok9

@Bartok9 Bartok9 commented May 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #22975 and #22997.

fix(oneshot): hermes -z returns empty stdout (#22975)

Root cause: In _run_agent(), agent.stream_delta_callback = None suppresses token callbacks but _has_stream_consumers() returns False — so _use_streaming stays True. The response is emitted as stream deltas into the void; chat() returns "".

Fix: Set agent._disable_streaming = True before calling chat(). This forces the non-streaming path which returns the full response object directly.

Test: test_oneshot_disables_streaming_to_prevent_empty_stdout — asserts _disable_streaming is True when chat() is invoked.

fix(cron): whatsapp delivery silently dropped (#22997)

Root cause: 'whatsapp' was absent from _HOME_TARGET_ENV_VARS in cron/scheduler.py. _resolve_home_env_var('whatsapp') returned '', _resolve_delivery_targets() returned [], and the job was silently marked successful with no message sent.

Fix: One-line addition: 'whatsapp': 'WHATSAPP_HOME_CHANNEL' in _HOME_TARGET_ENV_VARS.

Test: test_whatsapp_deliver_resolves_home_channel — verifies the resolver returns a valid target when WHATSAPP_HOME_CHANNEL is set.

…ivery silently dropped

Fix NousResearch#22975 — hermes -z empty stdout:
  When stream_delta_callback is None and no other stream consumers are
  registered, _use_streaming stays True. The API response is emitted as
  stream deltas into the void and chat() returns ''. Fix: set
  _disable_streaming=True in _run_agent() before calling chat() so the
  non-streaming path is used and the full response is returned.

Fix NousResearch#22997 — cron silently drops deliver: whatsapp:
  'whatsapp' was absent from _HOME_TARGET_ENV_VARS so
  _resolve_home_env_var('whatsapp') returned '' and
  _resolve_delivery_targets() returned []. The caller treats an empty
  list as a no-op — no message sent, no error logged.
  Fix: add 'whatsapp': 'WHATSAPP_HOME_CHANNEL' to _HOME_TARGET_ENV_VARS.

Also:
  - Add lowercase bartok9 noreply email to AUTHOR_MAP (fixes check-attribution)
  - Add windows-footgun: ok suppression on process_registry.py:588
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management platform/whatsapp WhatsApp Business adapter labels May 10, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing with #23007 and #23033 for #22975 (oneshot empty stdout), and with #22998 for #22997 (whatsapp delivery).

@Bartok9

Bartok9 commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of competing PRs that arrived first or have deeper fixes:

Left review comments on both. Happy to contribute tests or additional coverage if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management P2 Medium — degraded but workaround exists platform/whatsapp WhatsApp Business adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes -z (oneshot) returns empty stdout despite successful API response

2 participants