Close an issue and optionally post a comment
Closes an issue with optional comment and reason.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-work@fractary<number> [--comment "<text>"] [--reason <reason>]claude-haiku-4-5<CRITICAL_RULES> YOU MUST:
YOU MUST NOT:
THIS COMMAND IS ONLY A ROUTER. </CRITICAL_RULES>
<WORKFLOW> 1. **Parse user input** - Extract issue number (required) - Parse optional arguments: --comment, --reason - Validate required arguments are presentCapture working directory context
WORK_CWD="${PWD}"Build structured request
ACTUALLY INVOKE the Task tool
IF THE TASK TOOL INVOCATION FAILS:
Return response
<ARGUMENT_SYNTAX>
This command follows the space-separated argument syntax (consistent with work/repo plugin family):
--flag value (NOT --flag=value)--comment "Fixed in PR #456" ✅--comment Fixed in PR #456 ❌Always use quotes for multi-word values:
✅ /work:state-close 123 --comment "Fixed in PR #456"
✅ /work:state-close 123 --comment "Duplicate of #100" --reason duplicate
❌ /work:state-close 123 --comment Fixed in PR #456
Single-word values don't require quotes:
✅ /work:state-close 123
✅ /work:state-close 123 --reason duplicate
✅ /work:state-close 123 --comment Fixed
Reason values are exact keywords:
completed, duplicate, wontfixdone, finished, completed successfully
</ARGUMENT_SYNTAX><ARGUMENT_PARSING>
Required Arguments:
number (number): Issue number (e.g., 123, not "#123")Optional Arguments:
--comment (string): Comment to post when closing, use quotes if multi-word (e.g., "Fixed in PR #456")--reason (enum): Reason for closing. Must be one of: completed (work finished), duplicate (duplicate issue), wontfix (will not address) (default: completed)Maps to: close-issue operation </ARGUMENT_PARSING>
<EXAMPLES> ## Usage Examples# Close issue
/work:state-close 123
# Close with comment
/work:state-close 123 --comment "Fixed in PR #456"
# Close as duplicate
/work:state-close 123 --reason duplicate --comment "Duplicate of #100"
# Close as wontfix
/work:state-close 123 --reason wontfix --comment "Not addressing this"
</EXAMPLES>
<AGENT_INVOCATION>
After parsing arguments, invoke the work-manager agent with a structured request.
Invoke the fractary-work:work-manager agent with the following request:
{
"operation": "close-issue",
"parameters": {
"issue_number": "123",
"comment": "Fixed in PR #456",
"reason": "completed"
}
}
The work-manager agent will:
<ERROR_HANDLING> Common errors to handle:
Missing issue number:
Error: issue_number is required
Usage: /work:state-close <number>
Invalid reason:
Error: Invalid reason: invalid
Valid reasons: completed, duplicate, wontfix
Already closed:
Warning: Issue #123 is already closed
No action taken
</ERROR_HANDLING>
<NOTES> ## Close ReasonsSome platforms support close reasons:
This command works with:
Platform is configured via /work:init and stored in .fractary/plugins/work/config.json.
FABER workflows automatically close issues during the Release phase after successful deployment.
For detailed documentation, see: /docs/commands/work-state.md
Related commands:
/work:state-reopen - Reopen issue/work:state-transition - Transition to workflow state/work:comment-create - Add comment/work:init - Configure work plugin
</NOTES>