Skip to content

Instantly share code, notes, and snippets.

@renezander030
Created June 19, 2026 12:30
Show Gist options
  • Select an option

  • Save renezander030/1fa5f038e8e1161a75300a34ab534bb2 to your computer and use it in GitHub Desktop.

Select an option

Save renezander030/1fa5f038e8e1161a75300a34ab534bb2 to your computer and use it in GitHub Desktop.
GitHub issues as agent memory for Claude Code — hybrid retrieval over issues + discussions, no vector database

GitHub issues as agent memory for Claude Code — hybrid retrieval over issues + discussions, no vector database

You already have a GitHub connector. This adds the semantic layer: the issues you use as scratchpads, ADRs, and RFC threads become retrievable by meaning.

Last tested: 2026-06-19 — @reneza/ats-mcp + @reneza/ats-adapter-github, GitHub REST 2022-11-28. See Changelog at the bottom.

If this saves you setup time, follow @renezander030 — practical AI / coding-agent infrastructure notes.

Full repo with the MCP server + adapter source: github.com/renezander030/agentic-task-system

TL;DR cheat sheet

Goal Use
GitHub issues in Claude Code claude mcp add ats -e ATS_ADAPTER=@reneza/ats-adapter-github -- ats-mcp
Auth fine-grained PAT (github_pat_…), Issues = Read on just the repos you grant
Scope repos ATS_GITHUB_REPOS=owner/repo,owner/other
Bad credentials / Not Found token wrong, or missing Issues:Read on that repo — see Common failures
Mapping repo = project, issue/discussion = task (PRs filtered), labels = tags, body + comments = one record

A connector gives access. This gives retrieval.

The official GitHub MCP server connects your agent to GitHub — open an issue, list issues, comment. It can't answer "what did we decide about the rate-limit regression?" across a repo's history, ranked by relevance. ATS adds hybrid retrieval (keyword + dense + sparse, fused with RRF) over your issues and discussions, body + comment thread folded into one record, so the first result is the right thread.

ATS is task-first: GitHub issues are supporting context for the task you're working — the decisions, the repro, the prior thread — fused in alongside your task manager, not a separate store.

Recommended setup

npm install -g @reneza/ats-cli @reneza/ats-mcp @reneza/ats-adapter-github
export ATS_GITHUB_TOKEN=github_pat_xxxxxxxx
export ATS_GITHUB_REPOS=your-org/your-repo
ats config use @reneza/ats-adapter-github
ats find "rate limit regression"              # verify from the CLI first
claude mcp add ats -e ATS_ADAPTER=@reneza/ats-adapter-github -- ats-mcp

Create a fine-grained PAT at https://github.com/settings/tokens?type=beta, grant it only the specific repos you want read, with Issues: Read (add Read and write only if you want the agent to file/update issues). That per-repo read-only scope is the blast-radius boundary — a leaked token can't reach the rest of your account.

Optional dense/hybrid branch (local, no hosted vector DB):

docker run -d --name qdrant -p 6333:6333 qdrant/qdrant:latest
docker run -d --name ollama -p 11434:11434 ollama/ollama:latest
docker exec ollama ollama pull nomic-embed-text
ats sync vector

Common failures

Bad credentials (HTTP 401)

Token is wrong, expired, or has no resource owner selected. Re-create the fine-grained PAT and confirm the org/owner is set.

Not Found (HTTP 404) on a repo you can see in the browser

A fine-grained PAT returns 404 (not 403) when it lacks access to that repo or the Issues: Read permission. Edit the token: add the repo under Repository access, set Issues → Read.

API rate limit exceeded for user ID … (HTTP 403, X-RateLimit-Remaining: 0)

Authenticated REST is 5,000 req/hr. A cold corpus pull across big repos can spike it. Keep the corpus cache on (default) so warm finds don't re-fetch; the adapter honors Retry-After.

You have exceeded a secondary rate limit. Please wait a few minutes before you try again.

Too many requests in a short burst. The adapter backs off automatically; if you scripted a tight loop around bulkFetch, add a delay.

Smoke test

ats doctor                                        # adapter github, login ok, repos listed
ats find "a phrase from a real issue" --limit 3 --json | jq '.tasks[].title'
claude mcp list                                   # ats listed as connected

Then in Claude Code: "use ats find to pull the issue where we discussed ." Pass criteria: it cites issue number + title and returns a sources provenance array — pull requests excluded.

Series

Same six-method adapter contract, different backend:

To query GitHub and Notion and your task app in one ranked result, use the composite adapter.

Sources

Comment with your setup

Wiring GitHub into Claude Code another way? Comment with: token type (fine-grained vs classic vs GitHub App), repos/issue count, and any error strings not listed here.

Changelog

2026-06-19

  • Initial publication. Deliberate skips: no hardware matrix (not hardware-bound); no companion repo (source lives in agentic-task-system).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment