openai / openai/codex

GitHub Connector can create issues but cannot permanently delete them

Open
#42,156 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

codex-web enhancement tool-calls
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Summary

The GitHub App Connector available to ChatGPT/Codex can create issues and update/close them, but it does not expose an operation to permanently delete an issue even when the connected user has sufficient repository permissions.

This creates the same lifecycle asymmetry described for branches in #41863: the connector can create repository state that it cannot fully clean up afterward.

Concrete example

During a normal repository workflow, the agent accidentally created GitHub issues when the repository's canonical Codex implementation queue was actually notes/ files.

The connector could then:

  • rename the accidental issues;
  • set them not_planned;
  • close them;

but could not restore the repository to its previous state by permanently deleting those accidental issues.

The user can delete them manually through GitHub's Web UI because GitHub supports issue deletion for users with sufficient repository permissions. The missing capability is therefore in the connector tool surface, not in GitHub itself.

Current connector capability

Available operations include actions equivalent to:

create issue
update / close issue
add / remove labels and assignees
create / update / delete repository files
create commits
create branches
create / manage pull requests

There is no operation equivalent to:

delete_issue(repository_full_name, issue_number)

So the connector can create an issue by mistake but cannot undo that exact mutation.

Requested capability

Please add a narrowly scoped first-class action such as:

delete_issue(
    repository_full_name,
    issue_number,
)

Suggested behavior:

  1. require explicit user intent for permanent deletion;
  2. use the permissions of the connected GitHub App/user;
  3. permanently delete only the exact specified issue;
  4. surface permission / repository-policy failures clearly;
  5. do not silently substitute close / not_planned when permanent deletion was requested.

A generic authenticated GitHub REST escape hatch could also address this class of missing lifecycle operations, but a dedicated delete_issue action would be simpler and safer to audit.

Why this matters

This is more than cosmetic cleanup. For an agent that performs repository mutations, reversibility matters:

create issue -> delete accidental issue
create branch -> delete merged/accidental branch
create file -> delete file

The connector already supports destructive operations such as deleting tracked repository files and creating commits, so permanent issue deletion after explicit user authorization would fit the existing capability model.

Related issue

#41863 reports the analogous branch/ref lifecycle gap. This request is specifically for permanent issue deletion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the GitHub App Connector operation surface and compare its lifecycle handling with the branch gap in #41863. Done means a narrowly scoped delete_issue action exists, requires explicit intent, respects connected-user permissions, reports failures clearly, and does not substitute closing or marking the issue not planned.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
api, backend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.