Skip to content

fix(truncation): honor configured output cap on truncated tool-call retry - #514

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56619
Open

fix(truncation): honor configured output cap on truncated tool-call retry#514
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56619

Conversation

@hashbender

Copy link
Copy Markdown
Owner

Summary

  • Preserve custom provider max_output_tokens/max_tokens in config normalization and provider conversion
  • Pass runtime output caps through CLI agent setup and route signatures
  • Retry truncated tool-call responses using the configured/requested cap instead of the 4k/8k ladder
  • Persist a synthetic assistant marker when truncated tool-call retries are exhausted

Validation

  • Live Hermes session on custom:hyperspace-responses / gpt-5.5 / codex_responses wrote a 16,247-byte Day 4 briefing validation file via write_file on first try; no truncation ladder or Response truncated failure
  • bash scripts/run_tests.sh tests/test_output_truncation_runtime.py
  • bash scripts/run_tests.sh tests/test_ctx_halving_fix.py tests/cli/test_cli_provider_resolution.py -q

Mirror-of: NousResearch#56619
NousResearch#56619

@tenki-reviewer

tenki-reviewer Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Complete

Risk: 🟠 High (62/100) — 1 medium finding · 182 LOC across 4 files

Files Reviewed: 4
Findings: 1

By Severity:

  • 🟡 Medium: 1

Output truncation retry infrastructure changes with two issues: missing camelCase aliases for new config keys, and oneshot mode bypassing configured output caps.

Files Reviewed (4 files)
agent/conversation_loop.py
hermes_cli/cli_agent_setup_mixin.py
hermes_cli/config.py
tests/test_output_truncation_runtime.py

hashbender pushed a commit that referenced this pull request Aug 4, 2026
Single platform-adapter plugin under plugins/platforms/a2a/ — zero core
edits — that supersedes the entire A2A PR/issue cluster. Built on the
ctx.register_platform + ctx.register_tool surface the codebase now exposes.

Outbound (a2a toolset): a2a_discover / a2a_call / a2a_list let the agent
call any A2A-compliant peer over JSON-RPC message/send. Inbound (platform
adapter): a stdlib http.server serves an Agent Card at
/.well-known/agent.json and routes incoming tasks into the agent's LIVE
gateway session (the NousResearch#11025 insight) — same agent, full memory — returning
the reply over A2A.

Security on by default: no bearer token => 127.0.0.1-only bind; constant-
time bearer auth; inbound prompt-injection filtering + untrusted-peer
framing; outbound credential redaction; append-only audit log; per-context
conversation persistence outside the compaction pipeline.

Stdlib only (no a2a-sdk). 37 tests incl. a live HTTP round-trip
(card + message/send + reply) and a bearer-auth 401 path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant