Skip to content

Conversation

@agent-relay
Copy link
Contributor

@agent-relay agent-relay bot commented Jan 6, 2026

Summary

Fixes agent-relay-322

The spawner now calls buildClaudeArgs() when spawning Claude agents, which reads the agent's profile from .claude/agents/<name>.md and applies --model and --agent flags accordingly.

Problem

When agents are spawned via dashboard API (POST /api/spawn), the spawner did NOT read agent config files or apply --model flags. Agent profiles were only applied when using the CLI wrapper.

Solution

  • Import buildClaudeArgs from ../utils/agent-config.js
  • After parsing CLI and adding permissions flags, call buildClaudeArgs() for Claude agents
  • This applies --model and --agent flags from the agent's profile

Test plan

  • Spawn an agent with model: haiku in its profile via dashboard
  • Verify agent runs on haiku model (check logs or API response)

Generated with Claude Code

Agent Relay and others added 2 commits January 6, 2026 15:53
Fixes agent-relay-322

The spawner now calls buildClaudeArgs() when spawning Claude agents,
which reads the agent's profile from .claude/agents/<name>.md and
applies --model and --agent flags accordingly.

Previously, agent profiles were only applied when using the CLI wrapper
(agent-relay claude ...) but not when spawning via the dashboard API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
When buildClaudeArgs returns the original array reference unchanged,
the spawner's code that clears and repopulates args would accidentally
clear the returned array before copying from it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@khaliqgant khaliqgant force-pushed the fix/agent-relay-322-spawner-model-config branch from f7ef6ef to e29a19c Compare January 6, 2026 15:55
@khaliqgant khaliqgant merged commit 2f9ce40 into main Jan 6, 2026
9 checks passed
@khaliqgant khaliqgant deleted the fix/agent-relay-322-spawner-model-config branch January 6, 2026 16:35
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