Fix: Add dedicated agent assignment field for first-class AI agent support (#1572)#1692
Merged
tbrandenburg merged 5 commits intomainfrom Feb 7, 2026
Merged
Fix: Add dedicated agent assignment field for first-class AI agent support (#1572)#1692tbrandenburg merged 5 commits intomainfrom
tbrandenburg merged 5 commits intomainfrom
Conversation
added 4 commits
February 7, 2026 20:22
…pport (#1572) Work CLI's mission is "revolutionary mixed human-agent teams where everyone operates on the same level," but currently humans have a first-class assignee field while agents are relegated to label conventions (agent:X). This creates verbose queries, no semantic distinction, no validation, and poor visibility. Changes: - Added agent?: string field to WorkItem type (parallel to assignee) - Added agent to CreateWorkItemRequest and UpdateWorkItemRequest - Added --agent flag to create and set commands - Added 'agent' option to unset command - Display agent field in get command output - Added agent field support to query engine (WHERE agent=X filtering) - Local-FS adapter stores agent in frontmatter - GitHub adapter maps agent ↔ agent:* label (backward compatible) - Added comprehensive tests for agent field functionality Fixes #1572
Critical fix for agent field updates in GitHub adapter updateWorkItem() method. The previous implementation correctly handled agent field creation but silently ignored agent field updates. This fix: - Fetches current issue labels when agent is being updated - Removes all agent:* labels from current labels - Adds new agent:* label if agent is provided (or clears if undefined) - Preserves other labels during agent updates This ensures agent field updates work correctly via GitHub adapter, completing the first-class agent support feature.
Owner
Author
🔍 Automated Code Review (Updated)SummaryImplementation successfully adds first-class agent field support with comprehensive coverage. Critical bug in GitHub adapter fixed in second commit. Commits Reviewed
✅ Strengths
✅ Fixed Issues
🔒 Security
📝 Observations
Checklist
Self-reviewed by Claude • Ready for human review |
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
Work CLI's mission is "revolutionary mixed human-agent teams where everyone operates on the same level," but currently humans have a first-class
assigneefield while agents are relegated to label conventions (agent:X). This creates verbose queries, no semantic distinction, no validation, and poor visibility. Agents deserve a dedicatedagent?: stringfield parallel toassigneefor equal status.Root Cause
The root cause is that the WorkItem type originally focused on human workflows, adding agent support via label conventions rather than a dedicated field. The
assigneefield provides the exact blueprint to mirror for agent support.Changes
src/types/work-item.tsagent?: string | undefinedto WorkItem, CreateWorkItemRequest, UpdateWorkItemRequestsrc/cli/commands/create.ts--agentflag and wired to createWorkItem requestsrc/cli/commands/set.ts--agentflag for updating agent fieldsrc/cli/commands/unset.tssrc/cli/commands/get.tssrc/core/query.tssrc/adapters/local-fs/storage.tssrc/adapters/local-fs/index.tssrc/adapters/github/mapper.tsagent:*label (backward compatible)tests/unit/types/work-item.test.tstests/unit/core/query-focused.test.tsTesting
Validation
All checks pass ✅
Issue
Fixes #1572
📋 Implementation Details
Implementation followed artifact:
.claude/PRPs/issues/issue-1572.mdChanges made exactly as specified:
Backward compatibility:
Automated implementation from investigation artifact - ready for review