Skip to content

codex/security hermes bridge token - #68470

Closed
zhenheco wants to merge 34 commits into
NousResearch:mainfrom
zhenheco:codex/security-hermes-bridge-token
Closed

codex/security hermes bridge token#68470
zhenheco wants to merge 34 commits into
NousResearch:mainfrom
zhenheco:codex/security-hermes-bridge-token

Conversation

@zhenheco

Copy link
Copy Markdown

zhenheco added 30 commits June 12, 2026 00:16
….x compatibility

Gemini 3.x OpenAI-compatible tool-call responses can attach an opaque thought_signature directly on each tool_call. Hermes only preserved the older extra_content.google.thought_signature shape, so multi-turn replay dropped the direct signature and the next Gemini request could fail with INVALID_ARGUMENT for missing thought_signature.

Preserve direct thought_signature metadata in the chat_completions transport, expose it on normalized ToolCall objects, write it into stored assistant tool_calls, and replay it through the Gemini native and CloudCode request translators without interpreting the value. Existing extra_content replay still works, and unsigned Gemini 2.x-style tool calls omit the signature field.

Tests run:

- pytest tests/agent/transports/test_chat_completions.py tests/agent/test_gemini_native_adapter.py tests/agent/test_gemini_cloudcode.py tests/run_agent/test_run_agent.py::TestBuildAssistantMessage -q

- pytest tests/agent/test_gemini_native_adapter.py tests/agent/test_gemini_cloudcode.py tests/agent/test_gemini_schema.py tests/agent/test_gemini_fast_fallback.py tests/agent/test_gemini_free_tier_gate.py tests/hermes_cli/test_gemini_provider.py tests/hermes_cli/test_gemini_free_tier_setup_block.py -q

- pytest tests/agent/transports/test_types.py -q

- git diff --check
cherry-pick 至 v0.15.2 時 run_agent.py 衝突取 forwarder 側,遺漏將直掛
tool_call 的 thought_signature 寫入持久化 history,致 replay 掉 signature
(test_tool_call_direct_thought_signature_preserved 紅燈)。

- build_assistant_message 補搬直 thought_signature(對稱 extra_content)
- streaming accumulator 同步補(delta→acc→mock_tool_calls)
- gemini_cloudcode_adapter 回復 skip_thought_signature_validator 哨兵 fallback
  (v0.15.2 upstream 本有;無真 sig 時 Code Assist 仍需),真 sig 優先
- native adapter 維持經 extra_content carrier round-trip(新回歸測試實證)

Codex 交叉驗證找出 P1;Gemini 複審 native gap 經 round-trip 測試實證反駁。
全測 522 passed。
@zhenheco
zhenheco requested a review from a team July 21, 2026 07:31
@zhenheco

Copy link
Copy Markdown
Author

Opened against wrong base repo by mistake; closing.

@zhenheco zhenheco closed this Jul 21, 2026
@alt-glitch alt-glitch added invalid This doesn't seem right P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/desktop Electron desktop app (apps/desktop/*) comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins comp/tui Terminal UI (ui-tui/ + tui_gateway/) platform/slack Slack app adapter platform/telegram Telegram bot adapter platform/whatsapp WhatsApp Business adapter labels Jul 21, 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 comp/cli CLI entry point, hermes_cli/, setup wizard comp/desktop Electron desktop app (apps/desktop/*) comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins comp/tui Terminal UI (ui-tui/ + tui_gateway/) invalid This doesn't seem right P3 Low — cosmetic, nice to have platform/slack Slack app adapter platform/telegram Telegram bot adapter platform/whatsapp WhatsApp Business adapter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Bug Report: OpenViking memory writes cross tenant boundaries

2 participants