Repository navigation
refactor: remove built-in Github tool in favor of the gh CLI - #572
Merged
Merged
Conversation
## [0.116.0](v0.115.2...v0.116.0) (2026-06-01) ### 🚀 Features * add /copy shortcut to copy the current conversation to clipboard ([#565](#565)) ([bdfe618](bdfe618)) * **stt:** add Whisper speech-to-text for chat /voice and Telegram voice ([2f3828a](2f3828a)), closes [#559](#559) * regenerate config ([ae43e7f](ae43e7f)) ### 👷 CI/CD * centralize claude.yml via reusable workflow ([#557](#557)) ([3d48856](3d48856)) * centralize claude.yml via reusable workflow ([#558](#558)) ([affc7a1](affc7a1)) * centralize claude.yml via reusable workflow ([#563](#563)) ([feaeeb0](feaeeb0)) * centralize infer.yml via reusable workflow ([#564](#564)) ([2b80aed](2b80aed)) * **claude:** standardize workflow + task-based branch prefix ([2d256d0](2d256d0)) ### 🧹 Maintenance * **deps:** add whisper-cpp and ffmpeg to flox env ([2652e99](2652e99))
Closed
5 tasks
The built-in Github tool multiplexed 8 operations behind a single `resource` parameter (models routinely omitted required fields like issue_number/head), authenticated from a separate GITHUB_TOKEN rather than the gh credential chain (403s in CI), and duplicated `gh`. Remove it and standardize on `gh` via the Bash tool. - Delete the Github tool, its tests, the tools.github config block, GithubToolConfig/GithubSafetyConfig, the approval case, the `infer config tools github` command subtree, the GitHub API domain types, and the now-orphaned DetectGithubOwner helper. - Whitelist the non-destructive gh operations by default: read-only gh (issue/pr/repo/release/run/workflow list|view|status|diff|checks), gh auth status, gh issue create|edit|comment, gh pr create, and GET-only `gh api` (bare endpoint + read-only flags). Destructive ops (gh pr merge, gh repo delete, mutating gh api, ...) fall through to the approval flow. Also whitelist env/printenv. - Steer the default system prompt and dynamic context to use `gh` via the Bash tool for all GitHub operations. - Rewrite the `infer init` PR-creation snippet to use `gh pr create`. The tools.github config block and the `infer config tools github` commands are removed. Existing configs that still contain a tools.github section are ignored (viper drops unknown keys), so they do not error. Closes #570
edenreich
force-pushed
the
refactor/remove-github-tool-570
branch
from
June 1, 2026 18:18
92f0ce7 to
42897fb
Compare
Resolve conflict in internal/agent/agent_utils.go: keep both this branch's GitHub gh-CLI guidance (buildGitHubGuidanceInfo) and main's deterministic skill activation (buildActiveSkillInfo, #571) in buildContextInfo. Thread messages through buildSystemPromptText so BuildSystemPrompt() passes nil for a fresh session (no active skill yet).
edenreich
commented
Jun 1, 2026
inference-gateway-releaser Bot
pushed a commit
that referenced
this pull request
Jun 1, 2026
## [0.117.0](v0.116.0...v0.117.0) (2026-06-01) ### 🚀 Features * add GitHub issue references autocomplete and inline expansion ([#574](#574)) ([5056c9d](5056c9d)), closes [#N](https://github.com/inference-gateway/cli/issues/N) [#573](#573) ### 🐛 Bug Fixes * **skills:** load installed skills via sandbox carve-out and deterministic activation ([#571](#571)) ([18a9287](18a9287)), closes [#569](#569) ### ♻️ Code Refactoring * **system-prompt:** add available tools info to system prompt ([a913728](a913728)) * remove built-in Github tool in favor of the gh CLI ([#572](#572)) ([4c74997](4c74997)) * **config:** remove inline redundant comment ([c389929](c389929)) * system prompt - reduce tokens ([0be4b3a](0be4b3a)) ### 👷 CI/CD * centralize infer.yml + bump infer CLI and sync .infer config ([#567](#567)) ([c0369de](c0369de))
Contributor
|
🎉 This PR is included in version 0.117.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closed
edenreich
added a commit
that referenced
this pull request
Jun 29, 2026
## What Fixes documentation drift surfaced by a README↔codebase audit. **Documentation only — no code changes.** ## Changes **Phantom `Github` tool removed** — it was removed in #572 but still documented. Deleted from the README tools table, the full section in `docs/tools-reference.md`, and the env vars + YAML blocks in `docs/configuration-reference.md`. The system prompt already directs GitHub work to the `gh` CLI. **README tools table rebuilt** from `internal/agent/tools/registry.go` — all 35 registered tools, grouped by category with their config gates, plus a note that MCP tools register dynamically at runtime. (The old table listed 16 and omitted 28 real tools.) **New sections + TOC** — added a Table of Contents entry for the existing *Claude Code Mode (Subscription)* section and four new sections: *Agent Skills*, *Computer Use*, *Persistent Memory*, *Reminders & Command Hooks*. **Features / Commands / Shortcuts** - Linked the six orphaned docs (`skills`, `plan-mode`, `database-migrations`, `features/explorer`, `tasks-management`, `a2a-connections`). - Documented `infer skills` and `infer export`. - Shortcuts: removed the non-existent `/export`, corrected `/clear`, `/model`, `/copy`, and added the nine missing built-ins (`/new`, `/conversations`, `/context`, `/diff`, `/explorer`, `/release-notes`, `/tasks`, `/init`, `/init-github-action`). **Examples** — referenced all 8 example directories (only `telegram-channel` was linked before). **Approval defaults corrected** — `WebSearch`, `WebFetch`, and `A2A_SubmitTask` require approval under the global `tools.safety.require_approval: true` default; the old tables said "No". If web search/fetch needing approval is unintended, that's a code-side default rather than a docs issue. ## Verification - `markdownlint` clean (pre-commit Lint hook passed) - All README links + in-page anchors resolve; every linked doc and example dir exists - Every tool in `registry.go` is represented; no `Github` row remains ## Merge order The subagent tool suite (`Agent`, `ListSubagents`, `GetSubagentResult`, `CloseSubagent`, `ReadSubagentScreen`, `SendSubagentInput`, `ApproveSubagent`) is documented here but lands via #684. If this merges before #684, `main` will briefly describe those tools ahead of the code — merge #684 first (or together) to keep them in sync.
This was referenced Jun 29, 2026
edenreich
added a commit
that referenced
this pull request
Jun 29, 2026
## Summary Follow-up to #685. That PR synced `README.md`, `docs/tools-reference.md`, and `docs/configuration-reference.md` with the code; this one fixes the **same classes of drift** across the remaining `docs/*.md` pages — documented-but-removed features, broken internal links, and stale/mislabeled content. Every finding was re-verified against the current `main` before editing. ## Changes | File | Fix | | --- | --- | | `docs/mcp-integration.md` | Replace the phantom `url:` server field with `scheme`/`host`/`port`/`path` (12 examples + the per-server table); `MCPServerEntry` has no `url` field, so a `url:` key was silently ignored. Fix the `tests/mcp-test-server` link to `examples/mcp/`. | | `docs/shortcuts-guide.md` | Drop the phantom `/config` shortcut; fix the `/clear` description; move `/export`/`/env` out of built-ins; add the missing built-ins (`/new`, `/conversations`, `/context`, `/cost`, `/diff`, `/explorer`, `/tasks`, `/init-github-action`); add an **Init-Created Shortcuts** section. | | `docs/heartbeat.md` | Drop the `Github` tool (removed in #572); read GitHub state via the `gh` CLI through Bash. | | `docs/web-terminal.md` | Fix the three `docs/`-prefixed links (resolved to `docs/docs/…`); document `INFER_WEB_ENABLED`. | | `docs/database-migrations.md` | Repoint the dead `./storage-architecture.md` link to `./conversation-storage.md`. | | `docs/features/conversation-versioning.md` | Replace three links to non-existent `../configuration/` and `../user-guide/` dirs with existing docs. | | `docs/conversation-storage.md` | Describe the v2 append-only JSONL format (was "exactly two lines"); document the `d1` (Cloudflare D1) backend; fix the stale Redis example keys (`database`/`username`/`ttl` → `db`). | | `docs/conversation-title-generation.md` | Fix the invalid example model id `anthropic/claude-4-haiku` → `anthropic/claude-haiku-4-5-20251001`. | | `docs/directory-structure.md` | Complete the seeded-shortcuts list (add `/env`, `/skills`). | | `README.md` | Present `/export`, `/env`, `/agents`, `/skills` as `infer init`-created shortcuts — supersedes #685's wording that called `/export` "non-existent" (it's a real init-seeded shortcut). | ## Notes - Two over-cautious items from the issue were dropped after verification: the Redis `db` key in the **Configuration** section already matched the code, and most `INFER_WEB_*` vars were already documented (only `INFER_WEB_ENABLED` was missing). The Redis `db` fix landed instead in the **backend example**, where `database`/`username`/`ttl` were genuinely wrong. - Two findings from the original audit were disproved and excluded: `/agents` is a real init-seeded shortcut, and `infer keybindings` exists. ## Verification - `markdownlint` clean on all changed files. - Drift greps return nothing: no config `url:` in the MCP doc, no `/config` shortcut, no `Github` tool ref, no `docs/docs`/`storage-architecture`/`claude-4-haiku`/ `mcp-test-server`/`configuration/keybindings`/`user-guide/` targets. - Every changed/added relative link resolves to a real file on disk. Closes #686
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Jun 30, 2026
## [0.126.0](v0.125.0...v0.126.0) (2026-06-30) ### 🚀 Features * add persistent memory tool for agent ([#679](#679)) ([a487b13](a487b13)) * **agent:** interactive subagent management and unified background-work tracking ([#684](#684)) ([343e083](343e083)) ### 🐛 Bug Fixes * **chat:** bind opt+backspace and ctrl+backspace to delete-word-backward ([#697](#697)) ([173fe83](173fe83)), closes [#689](#689) [#576](#576) * **a2a:** retain completed background tasks in /tasks ([#691](#691)) ([#701](#701)) ([43b8e13](43b8e13)) * **autocomplete:** surface arguments for one-of/all-optional tool schemas ([#698](#698)) ([655b2e4](655b2e4)) ### ♻️ Code Refactoring * add .gitignore by default to the projects dir ([4717deb](4717deb)) * enable memory by default ([86c2158](86c2158)) * make infer config userspace-first ([#682](#682)) ([1e77e42](1e77e42)), closes [#680](#680) * **tui:** single event-loop ingress - one notifier, no self-rescheduling pollers ([#700](#700)) ([2ab8854](2ab8854)) * standardize comment punctuation by replacing em dashes with hyphens ([78f53a8](78f53a8)) ### 📚 Documentation * fix docs/ drift found by the README-to-codebase audit ([#687](#687)) ([413047a](413047a)), closes [#572](#572) [#686](#686) * sync README and reference docs with the codebase ([#685](#685)) ([c328423](c328423)), closes [#572](#572) [#684](#684) [#684](#684) ### 👷 CI/CD * **deps:** update CLAUDE workflow to version 0.14.5 ([eaba2b3](eaba2b3)) ### 🧹 Maintenance * add .infer to .gitignore ([08ef319](08ef319)) * **deps:** bump infer CLI v0.124.0 -> v0.125.0, infer-action v0.19.0 -> v0.19.1 ([#681](#681)) ([e9e7e21](e9e7e21)) * remove agent definitions ([4f7fd7d](4f7fd7d)) * remove unused configuration and shortcut files ([4c611db](4c611db)) * update claude-code to 2.1.191 ([729e81c](729e81c))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #570. Removes the built-in
Githubtool and standardizes on theghCLI (via Bash). The built-in tool multiplexed 8 operations behind oneresourceparam (models routinely omitted required fields likeissue_number/head), authenticated from a separateGITHUB_TOKENinstead of theghcredential chain (403 "Resource not accessible by integration" in CI), and duplicatedghwith worse error messages.Breaking change (
feat!): thetools.githubconfig block and theinfer config tools githubcommands are removed. Configs that still contain atools.githubsection are ignored (viper drops unknown keys), so they don't error.Changes
internal/agent/tools/github.go(+ tests), its registration, thetools.githubconfig (GithubToolConfig/GithubSafetyConfig, defaults, approval case), theinfer config tools githubcommand subtree, the GitHub API domain types (GitHubIssue/GitHubPullRequest/GitHubComment/…), and the now-orphanedDetectGithubOwnerhelper. The separate GitHub Action setup wizard is untouched.config/config.go+.infer/config.yaml): non-destructiveghops are auto-approved by default — read-onlygh <noun> list|view|status|diff|checks,gh auth status,gh issue create|edit|comment,gh pr create, and GET-onlygh api(bare endpoint + read-only flags). Plusenv/printenv. Destructive ops (gh pr merge,gh repo delete, mutatinggh api, …) are deliberately omitted so they fall through to the approval flow — not blocked.GITHUB OPERATIONScontext block (reaches existing users regardless of theirprompts.yaml, gated on Bash being enabled) plus a sentence in the default system prompt, both pointing atgh.infer init: the seeded PR-creation snippet now usesgh pr createinstead of the removed tool.Note on
gh apiGET-onlyGo's RE2 has no negative lookahead, so "
gh apibut not-X POST" can't be expressed directly. The pattern^gh api [^ -][^ ]*( --paginate| --jq <expr>| -q <expr>)*$auto-approves a bare endpoint with only read-only flags; anything with-X/--method/-f/-F/--field/--input(writes) falls through to approval. Safe by design.Tests
TestIsBashCommandWhitelisted_GhDefaults: asserts each read + targeted-write is whitelisted and the destructive set (gh pr merge,gh repo delete,gh api … -X POST,--method POST,-f …, leading-flag api) is not.config/promptstests updated; gate grep forTools.Github|GithubToolConfig|NewGithubTool|GitHubIssue|…|tools.githubcomes back empty.task test+task lintgreen. Smoke-tested the built binary:infer config tools githubno longer exists;infer config tools validateconfirms the gh allow/deny split.Follow-up
[DOCS]ticket forinference-gateway/docs(removal of the GitHub tool +ghwhitelist guidance) should accompany this PR, per the maintainer docs rule.