Files
docker-agent/e2e/exec_command_agent_test.go
2026-06-29 13:39:47 +02:00

20 lines
639 B
Go

package e2e_test
import (
"testing"
"github.com/stretchr/testify/require"
)
// TestExec_CommandTargetsAgent verifies that invoking a /command which targets
// a sub-agent sends the instructions directly to that agent, bypassing the root
// agent (no transfer_task round-trip). The recorded cassette only contains a
// single request carrying the specialist agent's system prompt, which proves
// the message reached the specialist directly.
func TestExec_CommandTargetsAgent(t *testing.T) {
t.Parallel()
out := runCLI(t, "run", "--exec", "testdata/command_agent.yaml", "/ask What's 2+2?")
require.Equal(t, "SPECIALIST: 4", out)
}