Skip to main content

sudocode issue close

Close one or more issues to mark them as complete.

Syntax

Description

The issue close command marks issues as completed by setting their status to closed and recording the closure timestamp. This is the standard way to complete work in sudocode. When you close an issue:
  • Status is set to closed
  • closed_at timestamp is recorded
  • updated_at timestamp is updated
  • Changes are exported to JSONL for version control
  • The issue remains in the database (not deleted)
Closing is a soft operation - issues remain in the database and can be reopened if needed. This is different from deleting, which permanently removes the issue.

Arguments

string
required
One or more issue IDs to closeExample: ISSUE-001 or ISSUE-001 ISSUE-002 ISSUE-003You can close multiple issues in a single command by providing multiple IDs.

Options

string
Closure reason or commentExample: --reason "Feature completed and tested"This is currently accepted but not stored in the database. Use for logging purposes in scripts.

Examples

Close a Single Issue

Mark one issue as complete:

Close Multiple Issues

Mark several issues as complete at once:

Close with Reason

Provide a closure reason (for logging):
The --reason option is accepted but not currently stored. It’s useful for command history and scripting logs.

Close Non-Existent Issue

Attempt to close an issue that doesn’t exist:
When closing multiple issues, valid closures proceed even if some IDs don’t exist:

JSON Output

Get machine-readable output:

What Happens When You Close an Issue

1

Status updated

The issue’s status field is set to closed
2

Timestamps updated

  • closed_at is set to the current timestamp
  • updated_at is set to the current timestamp
3

Database updated

Changes are written to the SQLite database
4

JSONL exported

The closure is recorded in issues.jsonl
5

Blockers released

Any issues blocked by this issue can now proceed (if this was their only blocker)

What Doesn’t Change

The following remain unchanged when closing an issue:
  • Issue ID - Stays the same
  • Assignee - Remains assigned
  • Priority - Unchanged
  • Relationships - All relationships persist
  • Content - Issue description remains
  • Tags - Tags are retained
Closed issues remain fully accessible and can be viewed, searched, and reopened.

Common Workflows

Completing Work

1

Finish implementation

Complete the feature and commit code
2

Run tests

Ensure all tests pass
3

Close the issue

4

Commit to git

Closing After Review

1

Mark as needs review

2

Review code and approve

Team reviews the implementation
3

Close after approval

Bulk Closing

Close multiple completed issues:

Reopening a Closed Issue

If work needs to resume:
Reopening clears the closed_at timestamp and allows work to continue.

Close vs Delete vs Archive

Close

Normal completion
  • Standard workflow completion
  • Issue remains visible in closed state
  • Can be reopened if needed
  • Preserves all data and relationships

Delete

Permanent removal
  • Removes issue from database
  • Deletes from JSONL
  • Cannot be undone (except via git)
  • Use for mistakes or duplicates

Archive

Hide from view
  • Hides from default listings
  • Preserves all data
  • For abandoned or obsolete work
  • Can be unarchived later
When to use each:
  • Close: Normal workflow - feature complete, bug fixed, work done
  • Archive: Work abandoned or no longer relevant, but want historical record
  • Delete: Duplicate issues, test issues, genuinely wrong content

Finding Closed Issues

View closed issues:

Common Questions

Yes, any user can close any issue. There are no access controls in the CLI.
They become unblocked and can proceed. Check ready work:
Yes, assignee is optional. You can close unassigned issues:
Update the status back to open:
This clears the closed_at timestamp.
No, issue close executes immediately. For safety in scripts, add your own confirmation:
Not directly from the CLI. The updated_at timestamp shows when it was closed, but not who closed it. Use git history to track this:
No, sudocode doesn’t have built-in notifications. Closures are tracked via git commits.

Troubleshooting

Cause: The issue ID doesn’t existSolution: Verify the ID:
Cause: Cache or sync issueSolution: Run sync to ensure consistency:
Verify the closure:
Cause: May still be filtered outSolution: Try:
Cause: Another process is accessing the databaseSolution:
  1. Close other sudocode processes
  2. Wait a moment and retry
  3. Check for zombie processes: ps aux | grep sudocode

issue list

List all issues

issue show

View issue details

issue update

Update issue (reopen)

issue delete

Delete an issue permanently

ready

Find ready work

blocked

View blocked issues

Next Steps

1

Complete your work

Implement the feature and test
2

Close the issue

3

Verify closure

4

Find next work

Issues Concept Guide

Learn more about issues and their lifecycle