Skip to content

fix(agent): harden tool sequencing and live guards - #47212

Closed
projetsjsl wants to merge 1 commit into
NousResearch:mainfrom
projetsjsl:fix/tool-sequencing-live-guards
Closed

fix(agent): harden tool sequencing and live guards#47212
projetsjsl wants to merge 1 commit into
NousResearch:mainfrom
projetsjsl:fix/tool-sequencing-live-guards

Conversation

@projetsjsl

Copy link
Copy Markdown
Contributor

Summary

  • Normalize Responses-style tool call IDs before OpenAI chat-completions transport strips Responses-only fields.
  • Harden Anthropic Keychain handling and isolate Keychain reads in tests.
  • Strengthen live-system process-killer guards, including shell and sudo wrapper forms.

Test plan

  • env -i PATH="$PATH" HOME="$HOME" TMPDIR="/tmp/hermes-tests" TZ=UTC LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONHASHSEED=0 PYTHONDONTWRITEBYTECODE=1 venv/bin/python scripts/run_tests_parallel.py tests/agent/test_openai_tool_sequence_sanitizer.py tests/agent/transports/test_chat_completions.py tests/agent/test_anthropic_keychain.py tests/test_live_system_guard_self_test.py -- -q — 136 passed
  • env -i PATH="$PATH" HOME="$HOME" TMPDIR="/tmp/hermes-tests" TZ=UTC LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONHASHSEED=0 PYTHONDONTWRITEBYTECODE=1 venv/bin/python scripts/run_tests_parallel.py -- -q — 31,476 passed; tests/hermes_cli/test_doctor.py timed out under parallel runner cap
  • env -i PATH="$PATH" HOME="$HOME" TMPDIR="/tmp/hermes-tests" TZ=UTC LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONHASHSEED=0 PYTHONDONTWRITEBYTECODE=1 venv/bin/python -m pytest tests/hermes_cli/test_doctor.py -q — 66 passed

Generated with Codex

Co-Authored-By: Codex <codex@openai.com>
@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists labels Jun 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Triage note: omnibus PR bundling three distinct fixes — (1) Responses-style tool_call_id normalization in the chat-completions transport, (2) HERMES_DISABLE_CLAUDE_CODE_KEYCHAIN guard for Anthropic Keychain reads, (3) coding_context marker-root walk fix. Consider splitting for focused review.

Related: #43299 (live-system guard hardening — same area, different mechanism: argv[0]-only executable treatment vs. shell/sudo wrapper forms; touches test_live_system_guard.py while this PR touches the self-test). Not a duplicate.

@projetsjsl projetsjsl closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants