Conversation
The field schema (names, types, descriptions, allowed values) already reaches the agent via the update_<name> tool params. The context now sends only the requiredness rules the tool omits: the base `required` list and the per-field `requiredWhen` conditions. For large forms the embedded schema was the single biggest chunk of the request, so this roughly halves the prompt for those cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The four JSDoc comments on FormFieldCondition, FormFieldSchema.requiredWhen, FormCollectorSchema, and toWireParameters still claimed the full schema reaches the agent via the dynamic context. After the previous commit the context sends only the requiredness rules (required list + requiredWhen conditions), so the comments are corrected to say that. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
Code reviewFound 1 issue (fixed in 3202951 per the
ago-sdk/src/forms/createFormCollector.ts Lines 40 to 42 in 455870c Two other candidates were checked and dismissed as pre-existing (not introduced by this PR): a field listed in both 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
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.
The form collector context was embedding the full form schema as JSON, duplicating field names, types, descriptions and allowed values that already reach the agent through the
update_<name>tool params. The context now sends only the requiredness information the tool omits: the baserequiredlist (the tool sends[]for incremental filling) and the per-fieldrequiredWhenconditions (stripped from the tool schema to stay JSON-Schema-legal). For large forms the embedded schema was the single biggest chunk of the request, so this roughly halves the prompt in those cases. Tests cover the new requiredness rules and guard against the full schema being re-embedded.🤖 Generated with Claude Code