BlogTasks and GitHub Issues
Can I give Claude Code a task from a GitHub issue without copy-pasting?
Yes. claude "query" starts an interactive Claude Code session with that text as its first prompt, so you can feed it the issue straight from the GitHub CLI: claude "$(gh issue view 123 --json title,body -q '.title + "\n\n" + .body')". A /fix-issue skill or the @claude GitHub Action are the two other ways to skip copy and paste.
Below, each option step by step (checked against the Claude Code and GitHub CLI docs in October 2026), then the catch: the prompt is sent before you read it.
Option 1: a one-line launcher
gh issue view can output JSON and filter it with a jq expression (-q). Claude Code takes an initial prompt as a positional argument. Put the two together:
claude "$(gh issue view 123 --json title,body -q '.title + "\n\n" + .body')"
To include the discussion, add the comments:
claude "$(gh issue view 123 --json title,body,comments \
-q '.title + "\n\n" + .body + "\n\n" + ([.comments[].body] | join("\n---\n"))')"
Wrap it in a shell function so you only type the number:
# ~/.zshrc
issue() {
local n="$1"
claude "$(gh issue view "$n" --json title,body \
-q '"Work on GitHub issue #'"$n"': " + .title + "\n\n" + .body')"
}
issue 123
Start it in its own worktree
If you run several agents, give each issue its own checkout. Claude Code's --worktree (-w) flag creates one under <repo>/.claude/worktrees/<name>:
claude -w issue-123 "$(gh issue view 123 --json title,body -q '.title + "\n\n" + .body')"
Or let gh create a branch linked to the issue and check it out in a worktree:
gh issue develop 123 --checkout --worktree ../app-123
cd ../app-123 && claude "$(gh issue view 123 --json title,body -q '.title + "\n\n" + .body')"
Option 2: a skill that fetches the issue itself
Instead of passing the text, tell Claude where to get it. Anthropic's best-practices guide shows a fix-issue skill whose first step is "Use gh issue view to get the issue details", with the issue number passed as $ARGUMENTS. Saved in .claude/skills/fix-issue/SKILL.md with disable-model-invocation: true, you start it with:
/fix-issue 123
This keeps your shell clean and lets Claude also read linked issues or comments if it needs them. The setup is in how to connect Claude Code to GitHub Issues.
Option 3: @claude on GitHub
With Claude Code GitHub Actions installed (/install-github-app), you don't open a terminal at all. Mention @claude in an issue comment, or in the title or body of a new issue, and the workflow runs Claude Code on GitHub's runners. Progress and results come back as a comment on the issue. By default, only users with write access to the repository can trigger it.
Limits of these methods
The prompt is sent immediately. With
claude "query", the issue text is the first message: Claude starts working before you have read what it received. If the issue is vague or out of date, you find out after the first turn. A safer habit:gh issue view 123 --json title,body -q '.title + "\n\n" + .body' > /tmp/brief-123.md $EDITOR /tmp/brief-123.md # read, trim, add "done means..." claude "$(cat /tmp/brief-123.md)"Issue text is untrusted input. Anyone who can open an issue on a public repository can write text that ends up in your agent's prompt. Anthropic documents prompt injection as a risk, with the permission system as a core safeguard. Check who wrote the issue (
gh issue view 123 --json author) before an agent with shell access acts on it.An issue is rarely a brief. It describes a problem, not a definition of done. Add the check the agent should run (a test, a command). Anthropic's guide calls a runnable check the difference between a session you watch and one you walk away from.
Nothing tracks the session. Once launched, nothing records which terminal has issue 123, or tells you when it is waiting for you.
With Kanbell
Kanbell is a macOS app with one window per project, real terminals in panes and tabs, and a task board that can be local or backed by GitHub Issues.
Pick an issue on the board and launch an agent from it. The brief is pasted into the terminal, not sent: you read it, edit it if needed, and press Enter. That removes the "sent before read" problem above. If the issue was opened by someone outside the repository, Kanbell asks you to confirm before it launches anything.
Once the agent runs, for Claude Code, Kanbell shows whether it is working, waiting or done, and ⌘⇧J jumps to the next agent waiting for you. For Claude Code sessions, Kanbell can then publish the session summary as a comment on the issue. See how to put what Claude Code did back on the issue.
FAQ
Can I include the issue comments in the prompt?
Yes. Add comments to the --json fields and join their bodies in the -q expression, or run gh issue view 123 --comments.
Can I review the prompt before Claude starts working?
Not with claude "query": the text is sent as the first message. Write it to a file first, read it, then pass the file's contents.
Can I start the session in its own worktree?
Yes. Combine --worktree (or -w) with the prompt, or create a linked branch and worktree with gh issue develop --checkout --worktree.
Is it safe to paste an issue into an agent?
Treat it as untrusted input. Anyone who can open an issue can write text that ends up in the agent's prompt. Read issues from outside contributors first.