Skip to content

fix(chatgpt, claude-desktop): run git from the Sdk instead of the host - #1526

Merged
jing2uo merged 1 commit into
mainfrom
fix/ai-git-sdk
Nov 23, 2026
Merged

jing2uo merged 1 commit into
mainfrom
fix/ai-git-sdk

Conversation

@jing2uo

@jing2uo jing2uo commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

What: Claude Desktop (com.anthropic.ClaudeDesktop) and ChatGPT (com.openai.ChatGPT). Fixes #1523.

Packaging:

  • Both move from org.freedesktop.Platform to org.freedesktop.Sdk 26.08 (as VS Code already does). The Sdk ships git, ssh, python3 and make inside the sandbox; the Platform has no git, so Claude Desktop's Code view couldn't show diffs.
  • ChatGPT: the git-host shim (/app/bin/git → flatpak-spawn --host git) is removed.
  • Vendor builds, wrappers and extra-data pins are unchanged.

Sandbox:

  • Added to both: --filesystem=~/.gitconfig:ro, --filesystem=xdg-config/git:ro (identity and settings for the sandbox git; read-only because git config --global writes by rename, which a single-file bind can't take) and --socket=ssh-auth (SSH remotes).
  • ChatGPT drops --talk-name=org.freedesktop.Flatpak: dangerous_permissions is now empty and the host-command packaging note is gone. Hooks and aliases now run inside the sandbox.
  • What's lost: a credential helper that lives on the host (gh, libsecret) isn't reachable, so HTTPS remotes relying on one will prompt or fail. Both metainfos say so.

Tested:

  • read-descriptor and audit-descriptor pass for both.
  • Under an Sdk-runtime sandbox with the same grants, git is /usr/bin/git, and git config --show-origin reads ~/.gitconfig. xdg-config/git also appears under the app's redirected XDG_CONFIG_HOME, so git finds it.
  • Not done: building or running either app; neither was launched or signed in. CI builds them.

Screenshots: unchanged.

Both apps' coding agents need git. Claude Desktop had none, so Code could
not show diffs (#1523). ChatGPT forwarded git to the host through a
flatpak-spawn shim, which needed --talk-name=org.freedesktop.Flatpak and
ran hooks, aliases and core.sshCommand outside the sandbox.

Switch both to the org.freedesktop.Sdk runtime, which ships git, and give
it the user's git config read-only plus the SSH agent. ChatGPT drops the
shim and the Flatpak talk name, so it no longer declares a dangerous
permission. A host-side credential helper is no longer reachable; the
metainfo says so.

Fixes #1523
@jing2uo
jing2uo merged commit 4de2929 into main Nov 23, 2026
@jing2uo
jing2uo deleted the fix/ai-git-sdk branch November 23, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] com.anthropic.ClaudeDesktop: lacks git

1 participant