Skip to content

agent compile returns 500 for every config (sends bare config, not {"agentConfig": …}) #96

Description

@nthmost-orkes

While testing the agentspan CLI against a live 3.32.0-rc.9 server, conductor agent compile <file> failed on every config with a 500:

Error: Cannot invoke "…AgentConfig.getName()" because "config" is null (status 500)

Digging in: agent compile POSTs the bare config to /api/agent/compile, but the server binds @RequestBody AgentStartRequest and reads the config from its agentConfig field — so it sees config == null. agent run already wraps correctly (startRequest{AgentConfig: def}); compile doesn't.

Confirmed with curl — same config, bare vs wrapped:

# bare (what the CLI sends) → 500 NPE
curl -X POST …/api/agent/compile -d '{"name":"foo","model":"openai/gpt-4o","instructions":"x","tools":[]}'

# wrapped → 200, returns the compiled workflowDef
curl -X POST …/api/agent/compile -d '{"agentConfig":{"name":"foo","model":"openai/gpt-4o","instructions":"x","tools":[]}}'

Repro

conductor agent init foo --model openai/gpt-4o
conductor agent compile foo.yaml   # → 500

Fix: internal/agent/client.goCompile should wrap the config the same way Run does (startRequest{AgentConfig: def}).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions