feat: parse dispatch labels from issue into session metadata#258
Open
alexgarden-mnemom wants to merge 1 commit intoComposioHQ:mainfrom
Open
feat: parse dispatch labels from issue into session metadata#258alexgarden-mnemom wants to merge 1 commit intoComposioHQ:mainfrom
alexgarden-mnemom wants to merge 1 commit intoComposioHQ:mainfrom
Conversation
Add parseDispatchLabels() to extract dispatch:, mode:, and model: prefixed labels from Linear/GitHub issues. First occurrence wins for dedup. Labels are stored in AgentLaunchConfig.metadata and passed through to agent plugins. - Add metadata?: Record<string, string> to AgentLaunchConfig (types.ts) - Export parseDispatchLabels from @composio/ao-core - Wire label parsing into spawn() after issue resolution - 8 unit tests covering all prefixes, empty labels, and dedup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 2, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| } | ||
| } | ||
| return result; | ||
| } |
There was a problem hiding this comment.
Metadata values redundantly include their own prefix
High Severity
parseDispatchLabels stores the full label string (e.g. "model:sonnet") as the value rather than extracting just the part after the colon ("sonnet"). This means metadata.model is "model:sonnet" instead of "sonnet", making the value unusable as a direct model name for per-issue model overrides or as a dispatch route key. Downstream consumers would need to redundantly strip the prefix that the key already represents. The tests assert this buggy behavior.
Additional Locations (1)
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
dispatch:,mode:, andmodel:prefixed labels from issue labels into session metadatametadata?: Record<string, string>toAgentLaunchConfigfor downstream use by agent pluginsMotivation
This enables orchestrators to use issue labels for dispatch routing (single vs team agents), execution mode selection (plan-first vs direct), and per-issue model overrides — without requiring config changes for each issue.
Changes
packages/core/src/types.tsmetadatafield toAgentLaunchConfigpackages/core/src/session-manager.tsparseDispatchLabels(), wire intospawn()packages/core/src/index.tsparseDispatchLabelspackages/core/src/__tests__/label-parser.test.tsTest plan
🤖 Generated with Claude Code