🤖 fix: add explicit char limit to workspace name prompt #2004
+2
−2
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
Adds explicit character limit guidance to workspace name generation prompts to prevent AI models from generating names that exceed the 20-character schema limit.
Background
AI models (especially Haiku) don't always respect JSON schema numeric constraints—they need explicit guidance in the prompt text. The schema already had
.max(20)but the AI wasn't seeing this constraint, resulting in names like"workspace-integration"(21 chars) that fail validation:Implementation
Added "max 15 chars" to both:
.describe()textThe 15-char target leaves room for the
-xxxxsuffix that gets appended, while the 20-char schema constraint remains as a safety net.Generated with
mux• Model:anthropic:claude-opus-4-5• Thinking:high• Cost:$0.45