openai / openai/codex

GitHub connector treats Discussion URLs as Issues and returns 404

Open
#41,757 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug skills tool-calls
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Summary

The Codex GitHub connector cannot read GitHub Discussions.

When asked to inspect a public Discussion such as:

https://github.com/agentscope-ai/agentscope/discussions/2412

the available GitHub tools route the discussion number through the Issues REST API. Both the discussion fetch and comment fetch therefore return HTTP 404, even though the public Discussion page exists and returns HTTP 200.

Environment

  • Product: Codex Desktop
  • App version: 26.825.32147
  • Bundle version: 7303
  • OS: macOS 26.5.2, build 25F84
  • GitHub plugin version: 0.1.12-5f7cd798dc99
  • Target repository: public
  • Target Discussion: agentscope-ai/agentscope#2412

Steps to reproduce

  1. Connect the GitHub plugin in Codex Desktop.

  2. Ask Codex to inspect:

    https://github.com/agentscope-ai/agentscope/discussions/2412

  3. Observe that the request is routed through operations equivalent to:

    fetch_issue(
        repository_full_name="agentscope-ai/agentscope",
        issue_number=2412
    )
    
    fetch_issue_comments(
        repo_full_name="agentscope-ai/agentscope",
        issue_number=2412
    )
    
  4. Both operations return:

    GitHub API error 404: Not Found
    

The generic GitHub fetch operation also rejects the Discussion URL:

HTTP 400:
GitHub Fetch URL is not an allowed public GitHub repository or search endpoint.

Verification

The Discussion itself exists:

GET https://github.com/agentscope-ai/agentscope/discussions/2412
HTTP 200

The Issues REST resource does not:

GET https://api.github.com/repos/agentscope-ai/agentscope/issues/2412
HTTP 404

The currently exposed GitHub connector surface contains 89 GitHub operations, including Issue and pull-request readers, but no Discussion reader or generic GraphQL query operation.

Root cause

A GitHub Discussion is not an Issue REST resource.

GitHub exposes repository Discussions through GraphQL:

repository(owner: "agentscope-ai", name: "agentscope") {
  discussion(number: 2412) {
    title
    body
    url
    updatedAt
    comments(first: 100) {
      totalCount
      nodes {
        author { login }
        body
        createdAt
        updatedAt
        replies(first: 100) {
          totalCount
          nodes {
            author { login }
            body
            createdAt
          }
        }
      }
    }
  }
}

Because the connector does not expose Discussion-specific operations, the model can only choose the semantically incorrect Issue tools or fall back to unauthenticated web access.

Expected behavior

The connector should recognize /discussions/<number> URLs and retrieve the corresponding GitHub Discussion and its comments.

Suggested connector changes

Add read operations such as:

  • github_fetch_discussion
  • github_fetch_discussion_comments
  • optionally github_search_discussions

At minimum, the resource router should detect /discussions/ URLs and avoid passing them to fetch_issue.

The returned shape should preserve:

  • title, body, author and category;
  • open/closed and answered state;
  • top-level comments;
  • nested replies;
  • timestamps, reactions and canonical URLs.

If Discussion access is unavailable, the connector should return an explicit unsupported-resource error instead of the misleading Issue 404.

Impact

This prevents Codex from reliably tracking RFCs, design proposals and community discussions hosted in GitHub Discussions. It also causes browser or web-search fallbacks to be used when the authenticated GitHub connection is otherwise working.

Security and privacy

The reproduction uses a public repository and contains no private repository data or credentials.

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 with the fetch_issue, fetch_issue_comments, and generic GitHub fetch URL-validation entry points described in the issue, then trace the resource router for /discussions/. Compare the existing Issue flow with the provided GraphQL Discussion shape. Done means Discussion URLs are routed separately, discussion content and nested comments are retrieved, or an explicit unsupported-resource error is returned.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.