fix: agent compile posts a bare config instead of the agentConfig envelope - #109
Merged
Conversation
No fix — this is only here to make the bug visible in CI. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mp-orkes
force-pushed
the
fix/issue-96-agent-compile-envelope
branch
from
August 6, 2026 15:48
b6a1417 to
d204422
Compare
It was the only server-touching test in the file without require_agents_api — the skip fired first and masked the omission. Without it, Enterprise fails with "Agents API is not available" instead of the actual #96 error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
/agent/compile binds AgentStartRequest server-side, same as /agent/start, so the config must travel in the agentConfig field. Compile posted the bare config, which deserialized to an empty request and was rejected for every input. Turns the two tests from the previous commit green. Fixes #96 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mp-orkes
force-pushed
the
fix/issue-96-agent-compile-envelope
branch
from
August 6, 2026 17:05
6a003cd to
4cacf88
Compare
mp-orkes
marked this pull request as ready for review
August 6, 2026 17:05
mp-orkes
commented
Aug 6, 2026
| func (c *restClient) Compile(ctx context.Context, def json.RawMessage) (json.RawMessage, error) { | ||
| var out json.RawMessage | ||
| if err := c.doJSON(ctx, http.MethodPost, pathCompile, def, &out); err != nil { | ||
| if err := c.doJSON(ctx, http.MethodPost, pathCompile, startRequest{AgentConfig: def}, &out); err != nil { |
Contributor
Author
There was a problem hiding this comment.
TODO: this request and the agent client should live in the go-sdk. (in another PR)
|
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
manan164
approved these changes
Aug 7, 2026
bradyyie
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #96.
agent compilefails for every config:/agent/compileexpectsAgentStartRequest.Compileposted the bare config, which deserialized to an empty request.How to test
🤖 Generated with Claude Code