hermes-agent/tests/run_agent
kshitijk4poor 22a137ed40 fix(agent): prefer late-completing real result over timeout message (review)
Review follow-up on the concurrent-tool deadline salvage. timed_out_indices is
snapshotted from not_done at the deadline; a worker can still finish and write
results[i] in the window before the post-execution result loop reads it. The
loop unconditionally replaced results[i] with a fabricated 'timed out' message
for any snapshotted index, discarding a genuinely-successful (just-late) result.

Gate the timeout message on 'and r is None' so a real result always wins. Add a
regression test that forces the snapshot-vs-result-loop race deterministically
(mutation-checked: reverting the guard fails it). Also document the intentional
detached-worker leak at the executor abandon site.
2026-07-01 14:56:52 +05:30
..
__init__.py
…
conftest.py
…
repro_48013_image_shrink_brick.py
…
test_413_compression.py test(agent): regression for token-only compression progress (#39550, #23767) 2026-06-22 15:26:29 +05:30
test_860_dedup.py
…
test_1630_context_overflow_loop.py
…
test_18028_content_policy_blocked.py fix(agent): add MiniMax 'new_sensitive' to content_policy_blocked patterns 2026-06-28 01:15:21 -07:00
test_24996_fallback_exhaustion_cooldown.py test(24996): freeze monotonic clock to de-flake fallback cooldown timing 2026-06-27 21:07:53 -07:00
test_28161_anthropic_stream_pool_cleanup.py fix(streaming): rebuild Anthropic client on stream cleanup instead of OpenAI client 2026-06-27 19:37:33 -07:00
test_31273_402_not_retried.py
…
test_32646_fallback_429_after_timeout.py fix(agent): reopen fallback chain after primary recovery 2026-06-28 00:57:42 -07:00
test_agent_guardrails.py fix: normalize tool_call_id whitespace in sanitizer 2026-06-30 01:43:40 -07:00
test_anthropic_prompt_cache_policy.py revert: back out prompt_caching.enabled toggle (#56105) for re-evaluation (#56126) 2026-07-01 00:20:32 -07:00
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
…
test_background_review_cost_controls.py feat(background-review): aux-model selector for the self-improvement review (#49252) 2026-06-22 14:54:53 -07:00
test_background_review_summary.py
…
test_background_review_toolset_restriction.py fix(profile): gate bg-review memory tool on memory_enabled (#54937 layer 2) 2026-06-30 15:30:06 -07:00
test_callable_api_key.py
…
test_codex_app_server_integration.py
…
test_codex_multimodal_tool_result.py
…
test_codex_no_tools_nonetype.py
…
test_codex_silent_hang_hint.py
…
test_codex_xai_oauth_recovery.py
…
test_commit_memory_session_context_engine.py
…
test_compress_focus_plugin_fallback.py
…
test_compression_boundary.py
…
test_compression_boundary_hook.py test(compression): pin rotation-fallback tests to in_place=False ahead of default flip 2026-06-25 12:56:05 -07:00
test_compression_feasibility.py fix(auxiliary): honor fallback chain when compression provider auth is unavailable 2026-06-25 13:08:18 -07:00
test_compression_persistence.py fix(agent): rebaseline in-place compression flushes 2026-06-27 03:04:26 -07:00
test_compression_trigger_excludes_reasoning.py
…
test_compressor_fallback_update.py
…
test_concurrent_interrupt.py
…
test_context_token_tracking.py
…
test_copilot_native_vision_headers.py
…
test_create_openai_client_disables_sdk_retries.py fix(agent): disable OpenAI SDK auto-retry that double-fires inside the rate-limit loop 2026-06-27 19:23:15 -07:00
test_create_openai_client_kwargs_isolation.py
…
test_create_openai_client_proxy_env.py
…
test_create_openai_client_reuse.py
…
test_credential_pool_interrupt.py
…
test_credits_notices_toggle.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 fix(agent): never persist empty-response recovery scaffolding 2026-07-01 01:08:27 -07:00
test_exit_cleanup_interrupt.py
…
test_fallback_credential_isolation.py fix(fallback): attach credential pool after provider switch 2026-06-27 04:39:26 -07:00
test_file_mutation_verifier.py feat(agent): require verification before finishing edits 2026-06-24 23:02:48 -05:00
test_identity_flush.py
…
test_image_rejection_fallback.py fix(image-routing): unblock message queue on OpenRouter 'no endpoints' image 404 (#53901) 2026-06-27 19:07:02 -07:00
test_image_shrink_recovery.py fix(agent): shrink anthropic-native image history 2026-06-22 18:23:21 -05:00
test_in_place_compaction.py test(compression): pin rotation-fallback tests to in_place=False ahead of default flip 2026-06-25 12:56:05 -07:00
test_infinite_compaction_loop.py fix(compressor): skip compression during summary LLM cooldown to prevent CLI freeze 2026-06-30 15:57:59 -07:00
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_long_context_tier_429.py
…
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 fix(agent): merge consecutive assistant messages before API replay (#29148, #49147) (#55603) 2026-06-30 04:22:56 -07:00
test_moa_loop_mode.py fix(moa): append reference block at end of aggregator prompt for KV-cache reuse 2026-07-01 01:59:00 -07:00
test_moa_streaming.py feat(moa): stream the aggregator response to the user 2026-06-30 12:07:01 -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_openai_client_lifecycle.py
…
test_partial_stream_finish_reason.py fix(agent): route content-filter stream stalls to fallback chain (#32421) 2026-06-28 01:15:21 -07:00
test_percentage_clamp.py fix(context): clamp -1 post-compression sentinel in sibling status paths 2026-07-01 13:36:50 +05:30
test_plugin_context_engine_init.py
…
test_primary_runtime_restore.py
…
test_provider_attribution_headers.py fix(copilot): recognize enterprise subdomains in host checks 2026-06-30 03:27:41 -07:00
test_provider_fallback.py test(provider): pin api.anthropic.com host on fallback api_mode 2026-07-01 02:18:56 -07:00
test_provider_parity.py fix Nous auth refresh for idle agents 2026-06-21 22:43:48 -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(agent): prefer late-completing real result over timeout message (review) 2026-07-01 14:56:52 +05:30
test_run_agent_codex_responses.py fix: keep plain custom GPT-5 relays on chat completions 2026-06-30 15:57:52 -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_streaming.py fix(streaming): handle adapters that return final responses 2026-06-30 16:41:09 -07:00
test_streaming_tool_call_repair.py
…
test_strict_api_validation.py
…
test_strip_reasoning_tags_cli.py
…
test_summarize_api_error.py fix(agent,cli): surface empty-body API errors and fail oneshot exit code 2026-06-28 02:05:20 -07:00
test_switch_model_context.py
…
test_switch_model_fallback_prune.py
…
test_switch_model_pool_reload_52727.py fix(agent): reload credential pool on switch_model provider change (#52727) 2026-06-27 04:39:26 -07:00
test_switch_model_rollback.py
…
test_thinking_only_sanitizer.py
…
test_thinking_sig_recovery_persistence.py
…
test_tls_fd_recycle_corruption.py
…
test_token_persistence_non_cli.py
…
test_tool_arg_coercion.py
…
test_tool_call_args_sanitizer.py
…
test_tool_call_guardrail_runtime.py
…
test_tool_call_incremental_persistence.py fix(agent): persist tool calls before turn-end flush 2026-06-24 02:15:57 +05:30
test_tool_executor_contextvar_propagation.py
…
test_tool_name_db_persistence.py
…
test_turn_completion_explainer.py test(agent,gateway): cover partial-stream recovery and restart helper salvage 2026-06-27 22:03:14 -07:00
test_unicode_ascii_codec.py
…
test_vision_aware_preprocessing.py
…
test_vision_tool_messages.py
…