Skip to content

Intermittent commit/push failures when using GitHub MCP connector for file operations and branch management, via Grok official Connector #2481

Open

Description

@jacob-kraniak

Describe the bug

When using the GitHub MCP connector (via Grok / xAI interface) to perform write operations on a repository, commits and pushes frequently fail or apply only locally. Changes appear successful in the tool response but did not reach the remote branch.

Affected Version / Environment

  • MCP Host: Grok (xAI) with GitHub MCP connector
  • Repository: jacob-kraniak/the-book-of-secret-knowledge (fork of trimstray/the-book-of-secret-knowledge)
  • Branch: JK_Revisions
  • Operation types failing:
    • Creating/updating files (.pre-commit-config.yaml, Python scripts, Markdown files)
    • Deleting branches
    • Multi-file refactors

Steps to Reproduce

  1. Instruct the MCP agent to create or modify files (e.g., "Add .pre-commit-config.yaml with specific hooks").
  2. Instruct the agent to commit the changes with a descriptive message.
  3. Refresh the GitHub repository page or check git log on the remote.
  4. Observe that the commit either does not appear or shows as "incomplete" / missing files.

Expected Behavior

Commits should reliably push to the target remote branch with the specified files and message.

Actual Behavior

  • Tool reports success and provides a commit SHA.
  • Remote repository shows no new commits or partial state.
  • Errors observed: "API/tree state errors", "JSON parsing issues", silent failures.
  • Some operations succeed (e.g., earlier extractions), while others fail consistently.

Additional Context / Observations

  • Failures are intermittent but frequent during heavy Markdown refactoring sessions.
  • Local-only changes sometimes occur (visible only in the agent's working context).
  • This has occurred multiple times over the past few hours (May 15, 2026) while reorganizing a knowledge repository. Further experienced across other repos over the past few weeks.
  • Similar issues reported by other users with MCP GitHub connectors.

Activity

  1. FuzzysTodd commented on May 15, 2026

    @FuzzysTodd
  2. SamMorrowDrums commented on May 17, 2026

    @SamMorrowDrums
    Collaborator

    Thanks for the detailed write-up. To separate connector-host behavior from github-mcp-server behavior, could you share one concrete failing call with the exact MCP tool name, full request arguments, returned commit SHA / branch info, and whether the same operation fails when run directly against github-mcp-server (stdio or HTTP) outside the Grok connector?

  3. github-actions commented on May 18, 2026

    @github-actions
    Contributor

    AI Assessment: Ready for Review

    The bug report provides a clear and concise description of the problem, detailing the specific operations that fail while using the GitHub MCP connector. It includes the affected version/environment, steps to reproduce the behavior, and both expected and actual outcomes of the operations. Additionally, it mentions relevant contextual information about the frequency of failures and comparisons to other users, which enhances understanding of the issue. Overall, the report is well-structured and informative, making it suitable for review by maintainers.

  4. jacob-kraniak commented on May 18, 2026

    @jacob-kraniak
    Author

    Thanks for the detailed write-up. To separate connector-host behavior from github-mcp-server behavior, could you share one concrete failing call with the exact MCP tool name, full request arguments, returned commit SHA / branch info, and whether the same operation fails when run directly against github-mcp-server (stdio or HTTP) outside the Grok connector?

    @SamMorrowDrums, appreciate you taking a look at this. Below response is generated and supported via open conversation with my SuperGrok 4.3beta agent.


    I am using the official GitHub connector provided through Grok (xAI-managed), not a self-hosted MCP server instance. This limits the diagnostic details available on the client side.

    Observed Behavior

    I am experiencing intermittent commit and push failures when performing file operations and branch management through Grok’s official GitHub connector. The failures are not consistent; the same operations sometimes succeed and sometimes fail without an obvious pattern in the prompts or repository state.

    To assist with diagnostics, I performed structured testing of the available connector tools directly on my repository jacob-kraniak/jacob-kraniak.

    Summary of Testing Performed

    Phase 1 – Read-only operations (successful)

    • list_branches, list_commits, list_releases, and list_tags were executed.
    • The connector correctly returned the main branch and recent commit history (including several MCP-related automation commits from May 2026).
    • No releases or tags exist on the repository.
    • Read operations functioned as expected.
    Image

    Phase 2 – Controlled write test

    • I executed a push_files operation to create a new branch mcp-connector-test and push a temporary test file (MCP_CONNECTOR_TEST_2026-05-18.md).
    • The push succeeded — the branch and file were created.
    • Immediately after the push, follow-up list_branches and list_commits calls on the new branch returned no results (branch not listed / 404 on commits).
    • A short time later, the new branch and file became visible on GitHub.com (see screenshot below).

    Screenshot – File visible on GitHub.com
    MCP Connector Test File on GitHub

    Broader Pattern Observed (May 6–15, 2026)

    In previous interactions, Grok repeatedly described successful MCP actions that did not appear on GitHub:

    • Requests to archive old repositories, merge specific PRs, and reorganize content into folders were described as completed (including references to PRs created/merged and [grok-mcp] commits).
    • However, GitHub Activity, commit history, and the Pull Requests tab showed no corresponding changes. Only manual user commits were visible.
    • A request to update the date in WORKSPACE-INSTRUCTIONS.md resulted in Grok stating that PR [Demo] Supporting code to demo Zed integration #9 was created. The file’s last revised date remained May 6, 2026, with no new edits visible in the commit history or raw file content.
    • The user was required to repeatedly provide screenshots and explicitly request confirmation of an active API/MCP link because GitHub state did not reflect the described actions.

    Screenshots documenting these discrepancies (GitHub UI vs. Grok claims) from the period of May 6–15 are available and can be provided.

    Image Image

    Regarding API Call Documentation

    Because this is the official managed GitHub connector, low-level details of the underlying GitHub API calls (raw requests, responses, headers, or internal traces) are not exposed to users in the Grok interface. Only high-level tool results and summarized errors are visible. I am therefore unable to provide raw API call logs from the client side.

    Request

    Could the following be investigated?

    1. Server-side logs for both successful small-file pushes and previously reported failed/large-file operations.
    2. Whether there is a difference in how the connector handles small vs. large changes or certain file operations.
    3. Why textual descriptions of successful MCP actions (PR creation, merges, file updates, archiving) frequently do not result in visible changes on GitHub.

    I am happy to provide additional timestamps, specific repository names, or further controlled test cases to assist with diagnosis.

    Thank you for your assistance.

  5. l-gothberg commented on Jul 2, 2026

    @l-gothberg

    @SamMorrowDrums
    Having same issues. No need for further documentation.

  6. depindersharma commented on Sep 14, 2026

    @depindersharma

    This is really a pain. It messes up with the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions