Skip to content

feat(agents): tool_choice, async childSystemPrompt, profile background default, stopped children - #40

Merged
spacedevin merged 1 commit into
mainfrom
feat/agents-tool-choice-stop
Oct 14, 2026
Merged

spacedevin merged 1 commit into
mainfrom
feat/agents-tool-choice-stop

Conversation

@spacedevin

Copy link
Copy Markdown
Member
  • CallModel takes an optional fifth argument, ModelRequest { toolChoice }; createHyperyModel sends it as
    tool_choice ("auto" stays the default). forceTool(name) builds the one-tool choice.
  • runAgentLoop takes toolChoice: a ToolChoice for every round or a function of the round; the wrap-up call
    after maxRounds never forces one.
  • AgentHost.childSystemPrompt may return a Promise; the runtime awaits it.
  • The task tool passes run_in_background only when the model set it, so a profile's background applies.
  • A child whose stop signal (its own or the parent's) is raised is recorded as "stopped" even when the stop
    surfaced as a thrown error, as it does natively.

…emPrompt, keep a profile's background default, record a stopped child as stopped

- CallModel takes an optional fifth argument, ModelRequest { toolChoice }; createHyperyModel sends it as
  tool_choice ("auto" stays the default). forceTool(name) builds the one-tool choice.
- runAgentLoop takes toolChoice: a ToolChoice for every round or a function of the round; the wrap-up call
  after maxRounds never forces one.
- AgentHost.childSystemPrompt may return a Promise; the runtime awaits it.
- The task tool passes run_in_background only when the model set it, so a profile's background applies.
- A child whose stop signal (its own or the parent's) is raised is recorded as "stopped" even when the stop
  surfaced as a thrown error, as it does natively.
@spacedevin
spacedevin merged commit 3144a1f into main Oct 14, 2026
3 checks passed
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