hermes-agent/tests/run_agent
teknium1 296494db0e fix: stop infinite loop when assistant content is a block list
strip_think_blocks() ran re.sub() directly on content that could be a
list of blocks (Anthropic via OpenRouter returns assistant content as
[{type:text,...},{type:thinking,...}]). A list reaching re.sub raised
'TypeError: expected string or bytes-like object, got list', which the
outer conversation loop swallowed and retried forever — the observed
infinite 'preparing terminal...' loop that re-emitted the same
assistant text every iteration.

The live-turn path normalized list content to a string, but
_interim_assistant_visible_text reads a *stored* history message whose
content was persisted as a list and passes it straight into the shared
strip_think_blocks helper. Fix at the shared choke point: coerce
list/dict content to visible text (dropping reasoning blocks, which is
the function's job) before any regex runs, so every caller is safe.
2026-07-17 15:47:10 -07:00
..
__init__.py
…
conftest.py
…
repro_48013_image_shrink_brick.py
…
test_413_compression.py
…
test_860_dedup.py
…
test_1630_context_overflow_loop.py
…
test_18028_content_policy_blocked.py
…
test_24996_fallback_exhaustion_cooldown.py
…
test_28161_anthropic_stream_pool_cleanup.py
…
test_31273_402_not_retried.py
…
test_32646_fallback_429_after_timeout.py
…
test_63425_credential_pool_auto_detect.py fix(agent): validate credential pool after provider auto-detection (#63425) 2026-07-14 16:51:35 +05:30
test_agent_guardrails.py test: deflake CI and dev-machine flaky tests in bulk (11 tests, 10 files) (#61816) 2026-07-09 20:03:11 -07:00
test_anthropic_prompt_cache_policy.py
…
test_anthropic_third_party_oauth_guard.py
…
test_anthropic_truncation_continuation.py
…
test_api_max_retries_config.py
…
test_async_httpx_del_neuter.py
…
test_auth_provider_failover.py
…
test_background_review.py
…
test_background_review_cache_parity.py fix(background_review): gate reasoning_config inheritance on not-routed + dedupe recorder stubs 2026-07-14 17:19:46 +05:30
test_background_review_cost_controls.py fix(runtime): preserve resolved fork metadata 2026-07-10 18:32:32 +05:30
test_background_review_summary.py
…
test_background_review_toolset_restriction.py
…
test_callable_api_key.py
…
test_codex_app_server_compaction.py fix(context): persist fallback compaction breaker 2026-07-14 02:19:40 +05:30
test_codex_app_server_integration.py fix(codex): reconcile app-server bridge with #38835, gate commentary on show_commentary 2026-07-17 04:32:56 -07:00
test_codex_multimodal_tool_result.py
…
test_codex_no_tools_nonetype.py
…
test_codex_silent_hang_hint.py
…
test_codex_xai_oauth_recovery.py fix(codex): surface nested error envelope in Responses type=error SSE frames 2026-07-17 04:51:14 -07:00
test_commit_memory_session_context_engine.py
…
test_compress_focus_plugin_fallback.py
…
test_compression_boundary.py
…
test_compression_boundary_hook.py
…
test_compression_feasibility.py test(compression): expect complete runtime tuple 2026-07-17 09:08:30 -07:00
test_compression_persistence.py
…
test_compression_trigger_excludes_reasoning.py
…
test_compressor_fallback_update.py
…
test_concurrent_interrupt.py
…
test_context_token_tracking.py
…
test_conversation_fallback_state.py fix(conversation): clear _mute_post_response on substantive tool-only turn 2026-07-14 16:33:14 +05:30
test_copilot_native_vision_headers.py
…
test_create_openai_client_disables_sdk_retries.py
…
test_create_openai_client_kwargs_isolation.py
…
test_create_openai_client_proxy_env.py
…
test_create_openai_client_reuse.py
…
test_create_openai_client_ssl_verify.py
…
test_credential_pool_interrupt.py
…
test_credits_notices_toggle.py
…
test_custom_provider_extra_headers_client.py
…
test_deepseek_reasoning_content_echo.py
…
test_deepseek_v4_thinking_live.py
…
test_dict_tool_call_args.py
…
test_empty_response_recovery_persistence.py
…
test_exit_cleanup_interrupt.py
…
test_fallback_credential_isolation.py
…
test_fallback_reasoning_override.py feat(config): support per-model reasoning_effort overrides 2026-07-14 11:46:40 -07:00
test_file_mutation_verifier.py
…
test_fireworks_live.py fix(providers): align Fireworks integration with project policy 2026-07-11 05:43:35 -07:00
test_identity_flush.py
…
test_image_rejection_fallback.py
…
test_image_shrink_recovery.py
…
test_in_place_compaction.py
…
test_infinite_compaction_loop.py
…
test_init_fallback_on_exhausted_pool.py
…
test_interactive_interrupt.py
…
test_interrupt_propagation.py
…
test_invalid_context_length_warning.py
…
test_iteration_budget_race.py
…
test_jsondecodeerror_retryable.py
…
test_last_reasoning_per_turn.py
…
test_lmstudio_load_mode.py feat: add LM Studio JIT load mode 2026-07-16 15:23:14 +05:30
test_long_context_tier_429.py
…
test_malformed_tool_arguments.py fix(agent): reject malformed tool call arguments (#61784) 2026-07-09 20:52:44 -07:00
test_materialize_data_url_cleanup.py
…
test_memory_nudge_counter_hydration.py
…
test_memory_provider_init.py
…
test_memory_sync_interrupted.py
…
test_message_sequence_repair.py
…
test_moa_loop_mode.py fix(moa): scope the non-text placeholder to structured content only 2026-07-14 06:49:36 -07:00
test_moa_streaming.py feat(analytics): record auxiliary model usage per task in session accounting (#65537) 2026-07-16 04:23:12 -07:00
test_multimodal_tool_content_recovery.py
…
test_nonretryable_error_html_summary.py
…
test_notice_spine.py
…
test_nous_429_fallback_reentry.py
…
test_nous_fallback_unavailable.py
…
test_openai_client_lifecycle.py
…
test_partial_stream_finish_reason.py
…
test_percentage_clamp.py
…
test_plugin_context_engine_init.py
…
test_primary_runtime_restore.py fix(agent): restore primary credential pool after fallback (#62417) 2026-07-11 03:44:02 -07:00
test_provider_attribution_headers.py
…
test_provider_fallback.py
…
test_provider_parity.py test(providers): update Nous parity test for conversation tag 2026-07-16 01:13:43 -07:00
test_real_interrupt_subagent.py
…
test_redirect_stdout_issue.py
…
test_repair_tool_call_arguments.py
…
test_repair_tool_call_name.py
…
test_retry_status_buffer.py
…
test_review_prompt_class_first.py
…
test_run_agent.py fix: stop infinite loop when assistant content is a block list 2026-07-17 15:47:10 -07:00
test_run_agent_codex_responses.py fix(codex): harden final cache-key boundaries 2026-07-17 13:48:41 -07:00
test_run_agent_multimodal_prologue.py
…
test_sequential_chats_live.py
…
test_session_id_env.py
…
test_session_meta_filtering.py
…
test_session_reset_fix.py
…
test_session_source.py
…
test_steer.py
…
test_stream_drop_logging.py
…
test_stream_interrupt_retry.py
…
test_stream_single_writer_65991.py fix(codex): claim the stream-writer token on the codex_responses path too 2026-07-17 06:49:23 -07:00
test_stream_stale_breaker_reset.py
…
test_stream_stale_circuit_breaker.py
…
test_streaming.py fix(streaming): zero-event guard parity for the anthropic_messages path 2026-07-15 10:58:36 +05:30
test_streaming_tool_call_repair.py
…
test_strict_api_validation.py
…
test_strip_reasoning_tags_cli.py
…
test_summarize_api_error.py
…
test_switch_model_context.py
…
test_switch_model_fallback_prune.py
…
test_switch_model_pool_reload_52727.py fix(agent): restore primary credential pool after fallback (#62417) 2026-07-11 03:44:02 -07:00
test_switch_model_reapplies_headers.py
…
test_switch_model_reasoning_override.py feat(config): support per-model reasoning_effort overrides 2026-07-14 11:46:40 -07:00
test_switch_model_rollback.py
…
test_switch_model_stale_base_url.py
…
test_thinking_only_sanitizer.py
…
test_thinking_sig_recovery_persistence.py
…
test_tls_fd_recycle_corruption.py Revert "fix(agent): release pool FDs on owning-thread client close (#61979)" (#62141) 2026-07-10 19:12:32 -07:00
test_token_persistence_non_cli.py
…
test_tool_arg_coercion.py
…
test_tool_batch_segmentation.py fix(agent): canonicalise paths in parallel-batch planner to prevent same-file concurrent mutation 2026-07-16 04:26:32 -07:00
test_tool_call_args_sanitizer.py
…
test_tool_call_guardrail_runtime.py
…
test_tool_call_incremental_persistence.py
…
test_tool_executor_contextvar_propagation.py
…
test_tool_name_db_persistence.py
…
test_turn_completion_explainer.py
…
test_unicode_ascii_codec.py
…
test_verification_continuation_budget.py fix(agent): keep pending verification behind exit provenance 2026-07-10 11:53:58 +05:30
test_vision_aware_preprocessing.py
…
test_vision_tool_messages.py
…
test_wait_state_visibility.py feat(agent): explain long provider waits on the live status line (#64775) 2026-07-15 00:14:05 -07:00