ValidateCaptureArgs (internal/agentexec/helpers.go) checks only the derived top-level constraint lists (required fields, non-empty strings, booleans, required_when_true). The JSON Schema a capture tool advertises through Parameters -- enums, numeric types, nested objects, array shapes -- is shown to the agent over MCP but never enforced, so an agent can record a workflow value the schema forbids (e.g. triage's workflow enum) and the call is accepted.
Design
Resolve spec.Parameters once per call and validate the arguments against it with github.com/google/jsonschema-go (already in the module graph behind the MCP SDK), after the derived checks that give friendlier wording. Resolve the schema at definition time in agentResultTool so an unusable schema is refused where it is produced. A declared-output tool's schema permits null for value, which decodeCapturedOutput reads as not written.
Acceptance criteria
A triage-shaped schema rejects an out-of-enum workflow, a mistyped nested field, a bad array item and an over-long array, naming the field; a valid call passes; a shipped definition still parses.
Imported from beads archie-core-ij6r · GitHub #1562 · type bug · priority P2 · created 2026-10-08
ValidateCaptureArgs (internal/agentexec/helpers.go) checks only the derived top-level constraint lists (required fields, non-empty strings, booleans, required_when_true). The JSON Schema a capture tool advertises through Parameters -- enums, numeric types, nested objects, array shapes -- is shown to the agent over MCP but never enforced, so an agent can record a workflow value the schema forbids (e.g. triage's workflow enum) and the call is accepted.
### Design
Resolve spec.Parameters once per call and validate the arguments against it with github.com/google/jsonschema-go (already in the module graph behind the MCP SDK), after the derived checks that give friendlier wording. Resolve the schema at definition time in agentResultTool so an unusable schema is refused where it is produced. A declared-output tool's schema permits null for value, which decodeCapturedOutput reads as not written.
### Acceptance criteria
A triage-shaped schema rejects an out-of-enum workflow, a mistyped nested field, a bad array item and an over-long array, naming the field; a valid call passes; a shipped definition still parses.
---
_Imported from beads `archie-core-ij6r` · GitHub #1562 · type bug · priority P2 · created 2026-10-08_
Already fixed by 0a47a95cc: ValidateCaptureArgs validates against spec.Parameters via jsonschema-go, invalid schemas are refused at definition time in agentResultTool; covered by TestValidateCaptureArgsEnforcesSchema.
Already fixed by 0a47a95cc: ValidateCaptureArgs validates against spec.Parameters via jsonschema-go, invalid schemas are refused at definition time in agentResultTool; covered by TestValidateCaptureArgsEnforcesSchema.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
ValidateCaptureArgs (internal/agentexec/helpers.go) checks only the derived top-level constraint lists (required fields, non-empty strings, booleans, required_when_true). The JSON Schema a capture tool advertises through Parameters -- enums, numeric types, nested objects, array shapes -- is shown to the agent over MCP but never enforced, so an agent can record a workflow value the schema forbids (e.g. triage's workflow enum) and the call is accepted.
Design
Resolve spec.Parameters once per call and validate the arguments against it with github.com/google/jsonschema-go (already in the module graph behind the MCP SDK), after the derived checks that give friendlier wording. Resolve the schema at definition time in agentResultTool so an unusable schema is refused where it is produced. A declared-output tool's schema permits null for value, which decodeCapturedOutput reads as not written.
Acceptance criteria
A triage-shaped schema rejects an out-of-enum workflow, a mistyped nested field, a bad array item and an over-long array, naming the field; a valid call passes; a shipped definition still parses.
Imported from beads
archie-core-ij6r· GitHub #1562 · type bug · priority P2 · created 2026-10-08Already fixed by
0a47a95cc: ValidateCaptureArgs validates against spec.Parameters via jsonschema-go, invalid schemas are refused at definition time in agentResultTool; covered by TestValidateCaptureArgsEnforcesSchema.