Conversation
The agent_teams_create handler and parseAgentTeamsCreateArgs only
called .trim() on incoming fields. When the model emitted a malformed
argument blob like:
"name": "sinter-phase2</parameter>\n<parameter=description>…"
the plugin persisted and rendered the entire string as the team name,
member name, member role, task subject, and task description.
Add src/sanitize.ts with sanitizeField(value, param?):
- if <parameter=param>VALUE</parameter> is present, return VALUE
- otherwise truncate at the first '<'
- return null/undefined unchanged
Apply at every server handler in tools.ts and every render site in
src/client/*. Render-site guards also repair old sessions whose state
was persisted before the server-side fix, so no migration is required.
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.
Summary
The agent_teams_create handler and parseAgentTeamsCreateArgs only called .trim() on incoming fields. When the model emitted a malformed argument blob like
{"name": "sinter-phase2</parameter><parameter=description>..."}, the plugin persisted and rendered the entire string as the team name, member name, member role, task subject, and task description.Reproduction
Fix
Add src/sanitize.ts with sanitizeField(value, param?):
Apply at every handler (src/tools.ts) and every render site (src/client/*).
Tests
Compatibility
No schema change. Old sessions with dirty persisted state are repaired by the render-site guards, so no migration is required.