Skip to content

fix+feat: agent core fixes (Bucket P — 4 PRs) - #7541

Merged
teknium1 merged 5 commits into
mainfrom
salvage/bucket-p
Apr 11, 2026
Merged

fix+feat: agent core fixes (Bucket P — 4 PRs)#7541
teknium1 merged 5 commits into
mainfrom
salvage/bucket-p

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Four agent core fixes salvaged from #6951, #6953, #6950, #6944. All contributor authorship preserved.

1. feat(delegation): configurable reasoning_effort for subagents (#6951, @hermes-agent-dhabibi)

New delegation.reasoning_effort config key. Subagents can run at different thinking levels. 4 tests.

2. fix: copilot Responses-API wrapping for auxiliary tasks (#6953, @hermes-agent-dhabibi)

GPT-5+ on Copilot needs Responses API but aux client created plain OpenAI client. Now wraps in CodexAuxiliaryClient when needed. 3 tests.

3. fix(tools): dead code removal + brace path hardening (#6950, @luyao618)

Unreachable code in _is_likely_binary(), .format().replace() in _check_lint() to handle {curly brace} file paths. 16 tests.

4. fix(compression): truthful manual compression feedback (#6944, @aquaright1)

/compress no longer shows "✅ Compressed" when nothing changed. Shared summarize_manual_compression() helper detects no-ops and explains token estimate increases. Both CLI and gateway updated. 2 test files.

Test results

26 targeted tests passing. All 6 modified files compile clean.

hermes-agent-dhabibi and others added 5 commits April 10, 2026 21:15
Add delegation.reasoning_effort config key so subagents can run at a
different thinking level than the parent agent. When set, overrides
the parent's reasoning_config; when empty, inherits as before.

Valid values: xhigh, high, medium, low, minimal, none (disables thinking).

Config path: delegation.reasoning_effort in config.yaml

Files changed:
- tools/delegate_tool.py: resolve override in _build_child_agent
- hermes_cli/config.py: add reasoning_effort to DEFAULT_CONFIG
- tests/tools/test_delegate.py: 4 new tests covering all cases
…xiliary tasks

GPT-5+ models (except gpt-5-mini) are only accessible via the Responses
API on Copilot. When these models were configured as the compression
summary_model (or any auxiliary task), the plain OpenAI client sent them
to /chat/completions which returned a 400 error:

    model "gpt-5.4-mini" is not accessible via the /chat/completions endpoint

resolve_provider_client() now checks _should_use_copilot_responses_api()
for the copilot provider and wraps the client in CodexAuxiliaryClient
when needed, routing calls through responses.stream() transparently.

Adds tests for both the wrapping (gpt-5.4-mini) and non-wrapping
(gpt-4.1-mini) paths.
…int against brace paths

- Remove unreachable `if not content_sample` branch inside the truthy
  `if content_sample` block in `_is_likely_binary()` (dead code that
  could never execute).
- Replace `linter_cmd.format(file=...)` with `linter_cmd.replace("{file}", ...)`
  in `_check_lint()` so file paths containing curly braces (e.g.
  `src/{test}.py`) no longer raise KeyError/ValueError.
- Add 16 unit tests covering both fixes and edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: Install hook files modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

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.

4 participants