Skip to content

fix(delegate): salvage delegate PRs #6933 #6881 - #7360

Merged
teknium1 merged 3 commits into
mainfrom
hermes/bucket3
Apr 10, 2026
Merged

fix(delegate): salvage delegate PRs #6933 #6881#7360
teknium1 merged 3 commits into
mainfrom
hermes/bucket3

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvage of 2 delegate/subagent PRs. Contributor authorship preserved.

Cherry-picked:

Follow-up: Updated pre-existing schema assertion test after maxItems removal.

Closed:

Test results

92 tests pass (delegate, agent_guardrails)

Tranquil-Flow and others added 3 commits April 10, 2026 13:09
… resolution

When delegation.base_url routes subagents to a different endpoint, the
correct URL was passed through _resolve_delegation_credentials() and
_build_child_agent() into AIAgent.__init__(), but self.base_url could
fall out of sync with client_kwargs["base_url"] — the value the OpenAI
client actually uses.

This caused billing_base_url in session records to show the parent's
endpoint while actual API calls went to the correct delegation target.

Keep self.base_url in sync with client_kwargs after the credential
resolution block, matching the existing pattern for self.api_key.

Fixes #6825
…xcess

`delegate_task` silently truncated batch tasks to 3 — the model sends
5 tasks, gets results for 3, never told 2 were dropped. Now returns a
clear tool_error explaining the limit and how to fix it.

The limit is configurable via:
  - delegation.max_concurrent_children in config.yaml (priority 1)
  - DELEGATION_MAX_CONCURRENT_CHILDREN env var (priority 2)
  - default: 3

Uses the same _load_config() path as the rest of delegate_task for
consistent config priority. Clamps to min 1, warns on non-integer
config values.

Also removes the hardcoded maxItems: 3 from the JSON schema — the
schema was blocking the model from even attempting >3 tasks before
the runtime check could fire. The runtime check gives a much more
actionable error message.

Backwards compatible: default remains 3, existing configs unchanged.
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.

2 participants