hermes - 💡(How to fix) Fix Default pytest run fails under xdist across gateway/cron/subagent suites

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

A repo-default pytest run currently fails under the checked-in default addopts (-m 'not integration' -n auto) on a fresh worktree based on origin/main.

The failures appear to be broad test isolation / xdist interaction rather than the focused auxiliary-client/Bedrock issue fixed in PR #22077.

Root Cause

A repo-default pytest run currently fails under the checked-in default addopts (-m 'not integration' -n auto) on a fresh worktree based on origin/main.

The failures appear to be broad test isolation / xdist interaction rather than the focused auxiliary-client/Bedrock issue fixed in PR #22077.

Code Example

/home/ubuntu/.hermes/hermes-agent/venv/bin/python -m pytest -q --tb=no --disable-warnings --maxfail=40

---

59 failed, 7538 passed, 15 skipped, 210 warnings in 249.32s (0:04:09)
xdist.dsession.Interrupted: stopping after 40 failures

---

FAILED tests/agent/test_auxiliary_client.py::TestGetTextAuxiliaryClient::test_custom_endpoint_uses_codex_wrapper_when_runtime_requests_responses_api
FAILED tests/agent/test_subagent_stop_hook.py::TestSingleTask::test_fires_once
FAILED tests/agent/test_subagent_stop_hook.py::TestSingleTask::test_fires_on_parent_thread
FAILED tests/agent/test_subagent_stop_hook.py::TestSingleTask::test_payload_includes_parent_session_id
FAILED tests/agent/test_subagent_stop_hook.py::TestBatchMode::test_fires_per_child
FAILED tests/agent/test_subagent_stop_hook.py::TestPayloadShape::test_role_absent_becomes_none
FAILED tests/agent/test_subagent_stop_hook.py::TestPayloadShape::test_result_does_not_leak_child_role_field
FAILED tests/gateway/test_config.py::TestLoadGatewayConfig::test_bridges_quoted_false_platform_enabled_from_config_yaml
FAILED tests/gateway/test_discord_allowed_mentions.py::*
FAILED tests/cron/test_cron_script.py::TestBuildJobPromptWithScript::test_script_empty_output_noted
FAILED tests/gateway/test_discord_component_auth.py::*
FAILED tests/gateway/test_discord_connect.py::*
FAILED tests/gateway/test_discord_free_response.py::test_discord_free_channel_skips_auto_thread
FAILED tests/gateway/test_discord_model_picker.py::test_model_picker_clears_controls_before_running_switch_callback
FAILED tests/gateway/test_discord_reply_mode.py::*
FAILED tests/gateway/test_discord_send.py::TestIsForumParent::test_forum_channel_class_instance
FAILED tests/cron/test_scheduler_mcp_init.py::*
FAILED tests/gateway/test_google_chat.py::*
FAILED tests/gateway/test_send_image_file.py::TestDiscordSendImageFile::*

---

/home/ubuntu/.hermes/hermes-agent/venv/bin/python -m pytest tests/gateway/test_discord_allowed_mentions.py -q --tb=short --disable-warnings
# 19 passed in 2.37s

---

149 passed in 3.55s
10 passed in 1.91s
RAW_BUFFERClick to expand / collapse

Summary

A repo-default pytest run currently fails under the checked-in default addopts (-m 'not integration' -n auto) on a fresh worktree based on origin/main.

The failures appear to be broad test isolation / xdist interaction rather than the focused auxiliary-client/Bedrock issue fixed in PR #22077.

Environment

  • Repo: NousResearch/hermes-agent
  • Base commit tested: 242da9db9 (origin/main at time of testing)
  • OS: Ubuntu 24.04 on ARM/KVM
  • Python/env: existing Hermes dev venv from /home/ubuntu/.hermes/hermes-agent/venv
  • Pytest config: pyproject.toml default addopts = "-m 'not integration' -n auto"

Reproduction

From a clean worktree based on origin/main:

/home/ubuntu/.hermes/hermes-agent/venv/bin/python -m pytest -q --tb=no --disable-warnings --maxfail=40

Observed Behavior

The run stopped after xdist/maxfail with:

59 failed, 7538 passed, 15 skipped, 210 warnings in 249.32s (0:04:09)
xdist.dsession.Interrupted: stopping after 40 failures

Representative failed areas:

FAILED tests/agent/test_auxiliary_client.py::TestGetTextAuxiliaryClient::test_custom_endpoint_uses_codex_wrapper_when_runtime_requests_responses_api
FAILED tests/agent/test_subagent_stop_hook.py::TestSingleTask::test_fires_once
FAILED tests/agent/test_subagent_stop_hook.py::TestSingleTask::test_fires_on_parent_thread
FAILED tests/agent/test_subagent_stop_hook.py::TestSingleTask::test_payload_includes_parent_session_id
FAILED tests/agent/test_subagent_stop_hook.py::TestBatchMode::test_fires_per_child
FAILED tests/agent/test_subagent_stop_hook.py::TestPayloadShape::test_role_absent_becomes_none
FAILED tests/agent/test_subagent_stop_hook.py::TestPayloadShape::test_result_does_not_leak_child_role_field
FAILED tests/gateway/test_config.py::TestLoadGatewayConfig::test_bridges_quoted_false_platform_enabled_from_config_yaml
FAILED tests/gateway/test_discord_allowed_mentions.py::*
FAILED tests/cron/test_cron_script.py::TestBuildJobPromptWithScript::test_script_empty_output_noted
FAILED tests/gateway/test_discord_component_auth.py::*
FAILED tests/gateway/test_discord_connect.py::*
FAILED tests/gateway/test_discord_free_response.py::test_discord_free_channel_skips_auto_thread
FAILED tests/gateway/test_discord_model_picker.py::test_model_picker_clears_controls_before_running_switch_callback
FAILED tests/gateway/test_discord_reply_mode.py::*
FAILED tests/gateway/test_discord_send.py::TestIsForumParent::test_forum_channel_class_instance
FAILED tests/cron/test_scheduler_mcp_init.py::*
FAILED tests/gateway/test_google_chat.py::*
FAILED tests/gateway/test_send_image_file.py::TestDiscordSendImageFile::*

Expected Behavior

The default pytest command should either pass or the default addopts should avoid known-isolation failures so contributors can trust the standard test entry point.

Local Factors / Notes

  • A focused run of one failed file passed by itself:
/home/ubuntu/.hermes/hermes-agent/venv/bin/python -m pytest tests/gateway/test_discord_allowed_mentions.py -q --tb=short --disable-warnings
# 19 passed in 2.37s

That makes this look like order/parallelism/global-state leakage rather than a simple deterministic failure in that file.

  • The focused suspect cluster from PR #22077 passed separately:
149 passed in 3.55s
10 passed in 1.91s

Related Issues Checked

I searched open and closed issues before filing and did not find an exact duplicate using these queries:

  • xdist pytest gateway Discord tests
  • default pytest -n auto failures
  • subagent stop hook
  • pytest xdist curator tmp leftovers
  • Discord allowed_mentions gateway config tests
  • cron MCP init pytest failures

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Default pytest run fails under xdist across gateway/cron/subagent suites