Last modified: 2026-07-15 23:18:00 (PDT)
We recommend working with AI coding agents to help you code.
A large language model (LLM) is a statistical model trained to predict the next token in a sequence of text, based on patterns learned from enormous amounts of text during training. That single capability — predicting what comes next — turns out to be enough to write code, answer questions, and hold a conversation, once the model is large enough and trained on enough data.
A base model trained only to predict text is not yet a helpful assistant. A further training step, often reinforcement learning from human feedback, teaches the model to follow instructions, answer as a helpful assistant, and refuse harmful requests, rather than simply continuing whatever text it is given. This is the step that turns a raw language model into something like Claude or ChatGPT.
A model call is stateless: given the same input, it has no memory of any previous call. Every capability the rest of this chapter describes — holding a conversation, using tools, running autonomously as an agent — is scaffolding built on top of that one stateless function. The harness supplies the memory, the tools, and the control flow; the model only ever predicts what token comes next.
AI coding agents are AI agents specialized for coding. They differ from other AI coding tools in important ways:
Compared to inline coding assistants (like traditional autocomplete), coding agents work autonomously rather than providing suggestions as you type. They can navigate entire codebases, execute commands, and complete multi-step tasks without constant human guidance.
Compared to AI chatbots (like ChatGPT or Claude), coding agents don’t just generate code snippets in conversation—they actively interact with your development environment. While chatbots require you to copy code from a chat window and manually integrate it into your project, coding agents directly read your codebase, make changes to files, run tests and build commands, and create pull requests with their proposed changes. Chatbots are conversational assistants; coding agents are autonomous development tools.
Coding agents are autonomous software programs that can:
Coding agents operate in isolated environments where they can safely experiment and validate changes before proposing them. This allows them to work more independently than inline coding assistants, which require step-by-step human direction. The agent workflow typically involves analyzing requirements, planning an implementation, making changes, testing those changes, and creating a pull request with the results.
While coding agents can handle substantial development tasks, they still require human oversight and review. The human developer remains responsible for:
An AI harness is the scaffolding built around a language model that turns it into an agent able to do real work. The model itself only predicts text; the harness is what lets it read files, run commands, call external tools and APIs, and carry state across turns and sessions.
Most coding-agent harnesses — including the GitHub Copilot coding agent and Claude Code — share a similar set of layers:
CLAUDE.md/AGENTS.md — that persist instructions and learned preferences across sessions, so the harness does not relearn your conventions every time.An agent is not part of the harness itself. It is a configuration — a goal, a role, a bounded toolset, and a stopping condition — executed on top of the harness’s core loop (see Section 3). A single harness can host many different agents at once: a main conversation, and any number of subagents it spawns.
Structurally, an agent is a small record plus a fresh execution of the harness’s loop:
Agents can spawn agents: an orchestration layer runs many agent instances, some concurrently, and composes their results. Nesting is deliberately capped, usually to one level, because unbounded recursion has no natural stopping point and burns cost and time with no guardrail. An orchestration script is a scheduler over independent agent-loop instances, not a different execution model.
The layers described above are not all built the same way. Some are ordinary software; others are just text files the harness reads at runtime.
The program that runs the core loop — calling the model, parsing tool calls, enforcing permissions, managing the sandbox — is compiled or interpreted source code, the same as any other application. There is no markdown involved here; this layer is what makes a harness a harness, rather than just a prompt someone wrote.
An agent’s identity, and a skill’s metadata, are usually just a markdown file with a YAML front matter header. For example, a custom Claude Code subagent defined in .claude/agents/code-reviewer.md:
The front matter is parsed as structured configuration (name, description, allowed tools, model); the markdown body below it becomes that agent’s system prompt, verbatim. An Agent Skill’s SKILL.md follows the same shape: front matter for discovery metadata, a markdown body for instructions, and an optional folder of bundled scripts or reference files alongside it. No compilation step is involved; the harness reads the file and uses it directly.
A tool definition has two parts: a JSON Schema describing its parameters, which is the only part the model ever sees, and a handler function, ordinary code that performs the actual action (reading a file, running a command, calling an API). The schema is declarative data; the handler is real software the model never inspects or writes.
Multi-agent orchestration cannot be expressed declaratively, because it needs genuine control flow — loops, conditionals, parallel fan-out with a concurrency limit. So orchestration scripts are literal source files, executed by the harness, not parsed as prompt text the way an agent definition is.
Files like this manual, or a repository’s CLAUDE.md/AGENTS.md, carry no front matter and no schema. They are concatenated into the system prompt as plain text, and the harness trusts the model to read and follow that prose, the same way it follows any other instruction in its context.
An agent is not a standalone program that does the reasoning itself. It is an orchestration program: something closer in shape to a chat client or a build tool than to a compiler or a web server.
The actual token prediction happens on remote inference infrastructure, reached over HTTPS. The agent process itself does no heavy computation; it spends almost all its wall-clock time waiting — for a model API response, for a shell command to finish, for a file read. Structurally it is an event-loop program, the same category as a network client. Its core loop can be sketched in a few lines:
# Start the conversation with the agent's instructions and the task.
history = [system_prompt, user_message]
while True:
# Send everything so far to the model, along with what it's allowed to call.
response = call_model(history, tools=tool_schemas)
history.append(response)
# No tool calls means the model gave a final answer -- stop.
if not response.tool_calls:
break
# Otherwise, run each requested tool and feed the result back in,
# so the next model call can see what happened.
for call in response.tool_calls:
result = tool_registry[call.name](call.arguments)
history.append(result)Everything a harness adds — permissions, sandboxing, memory, subagents — is scaffolding wrapped around this loop, not a replacement for it.
Because most production coding-agent harnesses are closed source, the clearest way to see this shape in real code is to read an open-source one:
Their orchestration code runs to thousands of lines, because that is where the real engineering lives: retries, streaming, permission checks, and state management. A single agent definition running on top of that engine, by contrast, is typically tens of lines (see Section 5).
So an agent’s lifetime is scoped to a single task, not persistent: it starts when given a goal, runs for as long as its loop keeps producing tool calls, and ends the moment a stopping condition fires.
The relationship between a harness and an agent is closer to an interpreter running a program than to two peers calling each other.
Harness to agent: not a call, an instantiation. The harness does not “call” an agent as a subroutine it invokes and waits on. An agent has no code of its own outside the harness’s loop (see Section 6) — its whole behavior is that loop, running with the agent’s configuration (instructions, tool allowlist, model) loaded in. The harness instantiates and runs an agent, start to termination; it is not a function call with a return address.
Agent to harness: yes, a real call, via tool calls. While an agent’s loop is running, the model produces a tool-call request, and the harness’s dispatcher looks up and executes the matching handler — read a file, run a command, call an API. So the concrete direction of calling is agent calls harness, through tool dispatch, not the reverse.
Agent to agent: routed through the harness. When a parent agent spawns a subagent, it does not call that subagent directly. It issues a tool call that the harness’s dispatcher handles by spinning up a fresh instance of its own loop (see Section 4), running it to completion with the subagent’s configuration, and handing the result back to the parent as a tool result. Even “agent calls agent” bottoms out as: parent calls harness, harness instantiates and runs a new agent, harness returns that agent’s output to the parent.
The agent loop sketched earlier is really just the innermost piece. The harness wraps a bootstrap step and a permission/dispatch layer around it:
def run_harness():
# Load everything the loop will need before any conversation starts.
tools = load_tool_registry() # built-ins, plus whatever MCP servers expose
memory = load_memory(CLAUDE_MD_PATHS) # CLAUDE.md / AGENTS.md, concatenated
# The "main session" is just the harness's own loop, run with a default,
# unrestricted configuration -- not a separate program.
main_agent = Agent(config=default_config, system_prompt=memory)
return run_agent(main_agent, tools)
def run_agent(agent, tools):
history = [agent.system_prompt, agent.first_message]
while True:
response = call_model(history, tools=agent.tool_schemas)
history.append(response)
if not response.tool_calls:
break
for call in response.tool_calls:
# Every tool call passes through the harness's own gate first,
# regardless of which agent requested it.
check_permission(call)
if call.name == "spawn_subagent":
# A subagent is not called directly -- the harness recurses
# into a fresh instance of this same loop, then hands the
# finished result back as an ordinary tool result.
result = run_agent(Agent(call.arguments), tools)
else:
result = tools[call.name](call.arguments)
history.append(result)
return history[-1]run_agent is identical in shape to the loop in Section 6. run_harness and the permission check are the parts that only exist at the harness level, not inside any individual agent. That recursive call — run_agent calling itself for a subagent — is the concrete mechanism behind “agent calls agent, routed through the harness,” described in the previous subsection.
claude?Typing claude at a shell starts the harness process: it initializes the engine — the permission system, the tool registry, MCP client connections, and memory loaded from CLAUDE.md/AGENTS.md files. But the harness does not sit idle waiting for a program to be supplied separately. It immediately instantiates the default agent — the “main session” — to handle the interactive conversation: full tool access, a system prompt assembled from the loaded config, no restricted allowlist. That default agent is simply the harness’s baseline configuration for its own loop, not a second thing launched afterward.
There is no observable moment of “harness running, no agent yet.” The closest analogy is typing python at a shell: it launches the interpreter and drops you straight into a REPL evaluating your input, rather than leaving the interpreter idle with nothing loaded. The difference is that the harness’s default “program” is built in (the main-session agent’s configuration), rather than something you must supply. A custom subagent or a .claude/agents/*.md definition, by contrast, is a separate agent, instantiated on demand, mid-session, when the already-running main agent issues a tool call for it.
So typing claude launches the harness, and that act inherently instantiates the default agent that handles the session: harness names the engine and process; agent names the particular loop instance and configuration currently running inside it. At startup, those two come into existence together.
The emergence of sophisticated AI agents has prompted discussions about whether we are witnessing or approaching a technological singularity. Understanding this concept helps contextualize the rapid evolution of AI tools and our responsibility in using them.
The technological singularity is a hypothetical future point when technological growth becomes uncontrollable and irreversible, resulting in unforeseeable changes to human civilization. The concept, popularized by mathematician Vernor Vinge and futurist Ray Kurzweil, typically involves the creation of artificial superintelligence that recursively improves itself, leading to an intelligence explosion beyond human comprehension or control.
No, current AI coding agents (as of early 2026) do not represent the technological singularity.
While modern AI agents demonstrate impressive capabilities, they remain fundamentally different from the singularity scenario in several critical ways:
Limited autonomy: Today’s AI agents operate within strict boundaries and require human oversight. They cannot recursively improve their own core architecture or develop capabilities beyond their training.
Narrow intelligence: AI coding agents are specialized tools designed for specific tasks. They lack general intelligence, self-awareness, or the ability to operate outside their designed domain.
Human dependency: These agents require human developers to: review their work, provide direction, validate correctness, and make final decisions about their outputs.
No recursive self-improvement: Current AI agents cannot fundamentally redesign themselves or create more advanced versions of themselves autonomously. Any improvements to AI systems still require human researchers and engineers.
Controlled development environment: AI coding agents work in sandboxed environments with explicit permissions and constraints. They cannot independently acquire resources, modify their own constraints, or operate without human authorization.
Understanding that current AI agents are powerful but limited tools—not autonomous superintelligences—has important implications:
Maintain appropriate skepticism: AI agent outputs require the same critical review as any other tool-generated code.
Preserve human decision-making: The responsibility for code quality, security, and correctness remains with human developers.
Continue skill development: Using AI agents should enhance rather than replace human expertise.
Stay vigilant: While current agents don’t represent a singularity, the rapid pace of AI development requires ongoing attention to emerging capabilities and risks.
The value of AI coding agents lies in their ability to accelerate human productivity and learning, not in replacing human judgment or expertise. They are sophisticated tools that augment human capabilities while remaining under human control and oversight.
For thoughtful perspectives on AI consciousness and intelligence, see Douglas Hofstadter’s reflections in “I Thought I Was in an AI Apocalypse. Then I Started Looking Closer.”
AI coding agents and human coders have complementary strengths. Understanding these differences helps you decide when to delegate work to agents and when to handle tasks yourself.
| Task Type | Humans 😊 | AI agents 🤖 |
|---|---|---|
| Creative thinking | 😊 Humans excel at understanding context, handling ambiguous requirements, and thinking creatively about novel problems | 😞 AI agents struggle with ambiguous requirements and creative problem-solving in unfamiliar domains |
| Algorithmic thinking | 😞 Humans make mistakes when following repetitive instructions and may introduce inconsistencies | 😊 AI agents excel at executing well-defined, repetitive tasks with precision and consistency |
For most tasks, you won’t need to step in and manipulate code yourself. However, you’ll still need strong coding skills to:
As AI technology advances, the distinction between these strengths may shift. Yann LeCun, 2019 Turing Award winner and AI researcher at Meta and NYU, advocates for developing “world models”—AI systems that understand and reason about the physical world, not just language patterns (LeCun 2022).
World models aim to give AI systems:
As these technologies mature, AI agents may become better at tasks requiring contextual understanding and creative problem-solving. This makes it even more important to develop strong supervision and validation skills now, so you can effectively work with increasingly capable AI systems.
Coding agents can be accessed through several interfaces, each with different trade-offs for task size, feedback speed, and collaboration style.
The main differences are where the agent runs, how much repository context it can access, and how directly it can apply changes.
In practice, teams often combine these modes: use app or IDE chat to refine requirements, then hand implementation to a cloud or CLI agent, and finish with human review.
The following sections focus on GitHub Copilot’s specific workflow for assigning and managing coding tasks.
You can assign GitHub Issues directly to @copilot just like you would assign to a human collaborator:
On GitHub.com: Navigate to an issue and assign it to Copilot in the assignees section
In VS Code: In the GitHub Pull Requests or Issues view, right-click an issue and select “Assign to Copilot”
From Copilot Chat: Delegate tasks to Copilot directly from the chat interface in supported editors
Once assigned an issue, the coding agent follows an autonomous workflow:
Analysis: Reviews the issue description, related discussions, repository instructions, and codebase context
Planning: Determines what changes are needed and creates a work plan
Development: Works in an isolated GitHub Actions environment, modifies code, runs tests and linters, and validates changes
Pull Request Creation: Creates a draft pull request with implemented changes, audit logs, and a summary of modifications
Review and Iteration: You review the PR and can request changes; the agent will iterate based on your feedback
Between iterations of asking coding agents to extend a PR, human collaborators can also push changes directly to the PR branch. This allows for a collaborative workflow where both humans and agents contribute:
Human contributions: You can make quick fixes, add content, or refine the agent’s work by pushing commits to the same branch
Agent iterations: After your changes, you can ask the agent to continue working on additional requirements
Important: Try to avoid pushing changes while the coding agent is actively working. Simultaneous edits can produce conflicting diffs that:
Best practice: Wait for the agent to complete its current iteration (indicated by the PR being updated) before pushing your own changes to the branch. Then assign new work to the agent for the next iteration.
You can also prompt Copilot to create pull requests without first creating an issue:
copilot/*)When GitHub Copilot creates or updates a pull request, it cannot automatically trigger GitHub Actions workflows. You must manually approve each workflow run by clicking the approval button in the Actions tab or on the PR.
This manual approval requirement is a security measure that prevents potentially malicious or unintended code execution. Because Copilot can modify any file in the repository—including workflow files themselves or scripts called by workflows—allowing automatic workflow execution could create security vulnerabilities.
Key points:
.github/workflows/*.yml) or scripts they execute, potentially injecting malicious codeWorkaround considerations:
Some users have discussed using Personal Access Tokens (PATs) to allow Copilot to trigger workflows on your behalf, but this approach has security implications and should be carefully evaluated before implementation.
For more details and community discussion about this limitation, see:
For detailed instructions, see GitHub Copilot coding agent documentation.
When working with coding agents, using clear and specific prompts helps achieve better results. Here are some useful prompt formats that you can use when requesting assistance from coding agents:
Tidying up code:
Addressing failing workflows:
Decomposing code:
Updating content:
Expanding documentation:
Condensing content:
Clarifying content:
When GitHub Actions workflows fail, you can use Copilot to help diagnose and fix the issues. However, it’s important to use the right prompts depending on whether the problem is in your code or in the workflow configuration itself.
When to use: The workflow is functioning correctly, but it’s detecting problems in your code (e.g., failing tests, linting errors, build failures).
What you want: Fix the code issues without modifying the workflow files themselves.
Recommended prompts:
Example: If your R package has failing tests detected by usethis::use_github_action("check-standard"), you want Copilot to fix the test failures in your R code, not modify the workflow YAML file.
Why this matters: These prompts make it clear that you want code changes, not workflow changes. This helps prevent the agent from unnecessarily modifying your carefully-configured CI/CD pipeline.
When to use: The workflow configuration itself has problems (e.g., syntax errors in YAML, incorrect job definitions, outdated actions).
What you want: Fix the workflow files, but with extreme caution due to security implications.
Recommended prompts:
Important considerations:
Warning
Security Warning
Workflow files have access to repository secrets and can execute arbitrary code. Before accepting any changes to workflow files:
See Section 14 for more details on workflow file security.
When to do it yourself: Workflow syntax errors and configuration issues are often faster to fix manually than with Copilot, especially if you’re familiar with GitHub Actions. See Section 22 for more guidance.
When to use: You’re not sure whether the failure is due to code issues or workflow configuration problems.
Recommended approach:
Example workflow:
Coding agents are powerful programs that can work autonomously. They create pull requests that propose changes to the code in our repositories, potentially including their own configuration files and our automated workflows. They can work powerfully on our behalf, but they require careful oversight and control to ensure they serve our interests and that we understand the consequences of their actions.
Coding agents offer several advantages:
Built-in transparency: Coding agents create a clear record of their role in your work through commit history and code suggestions
Context-aware suggestions: Coding agents understand your codebase and can make contextually relevant suggestions
Integration with version control: Using coding agents within GitHub ensures that AI-assisted changes are tracked alongside all other code changes
Interactive workflow: Coding agents’ interactive nature encourages you to review and modify suggestions rather than blindly accepting them
Accelerated development: Coding agents can help you write boilerplate code, refactor existing code, and implement common patterns more quickly
Learning opportunities: Coding agents can suggest approaches or techniques you may not have considered, helping you expand your coding knowledge
However, coding agents also come with significant hazards:
Over-reliance: Depending too heavily on coding agents can atrophy your coding skills and understanding
Subtle bugs: AI-generated code may contain logic errors that are not immediately obvious
Security vulnerabilities: Coding agents may introduce insecure patterns or fail to follow security best practices
Inappropriate solutions: AI may suggest solutions that work but are not optimal for your specific research context or constraints
Hidden biases: Coding agents may perpetuate coding patterns or approaches that reflect biases in their training data
False confidence: Well-formatted, professional-looking code from AI can mask underlying problems and reduce critical review
Workflow manipulation risks: Coding agents that modify CI/CD workflows (.github/workflows/*.yml) or setup configurations can inadvertently or maliciously compromise repository security, expose secrets, or execute harmful commands
To work with coding agents safely and successfully:
Maintain active supervision: Never assume AI-generated code is correct. Review every line critically.
Understand before accepting: If you don’t understand what the code does, don’t use it. Take time to learn or ask a colleague.
Test thoroughly: AI-generated code must be tested as rigorously as code you write yourself. Don’t skip testing because “the AI wrote it.”
Start small: Begin with small, well-defined tasks to build confidence and understanding of the agent’s capabilities and limitations.
Verify logic and assumptions: Check that the AI hasn’t made incorrect assumptions about your data, requirements, or scientific context.
Review for security: Explicitly check for security issues, especially when handling sensitive data or user input.
Iterate and refine: Use coding agents as a starting point, not an endpoint. Refine and improve the generated code.
Maintain coding practice: Regularly write code yourself to maintain and develop your skills. Don’t let the agent do everything.
UC Davis campus guidance
UC Davis Student Affairs also provides guidance on the Responsible Use of Artificial Intelligence (AI). That page provides UC Davis-specific guidance on AI tool selection, campus training, and careful handling of sensitive data. Their recommendations, like ours, include careful validation, active supervision, and protection of confidential information.
Critical: Exercise Extreme Caution with Workflow Files
Be especially careful when allowing coding agents to edit GitHub Actions workflows or CI/CD configurations. These files control automated processes that can:
Never allow a coding agent to edit workflow files (especially .github/workflows/*.yml or copilot-setup-steps.yml) without thorough manual review. Before approving any workflow run, always check if the workflow files themselves have been modified. Malicious or erroneous changes to workflows can compromise your entire repository and its secrets.
When using coding agents, work interactively with the AI suggestions: review, modify, and test them rather than accepting them wholesale. This interactive approach helps ensure code quality and deepens your understanding of the code.
Remember: AI tools are assistants, not replacements for your expertise and judgment. The quality and correctness of your work remains your responsibility.
Coding agents require specific network access to function properly. If a coding agent is running behind a corporate firewall or on a restricted network, you may need to configure allowlists to enable coding agent functionality.
Coding agents run in a GitHub Actions environment with a built-in firewall that limits internet access by default. This firewall helps protect against:
By default, the agent’s firewall allows access to:
For the complete list of allowed hosts, see the Copilot allowlist reference.
In your repository’s “Coding agent” settings page, you can:
If a coding agent’s request is blocked by the firewall, a warning will be added to the pull request or comment, detailing the blocked address and the command that triggered it.
For more information, see Customizing or disabling the firewall for GitHub Copilot coding agent.
For data science and R-focused repositories, we recommend adding the following URLs to your Copilot allowlist. These sites are safe, reputable sources of documentation and packages that coding agents may need to access:
R Package Documentation and Ecosystems:
tidyverse.org - {tidyverse} package documentation and learning resourcesr-lib.org - Core R infrastructure packages ({devtools}, {testthat}, {usethis}, etc.)ggplot2.tidyverse.org - {ggplot2} visualization packagedplyr.tidyverse.org - {dplyr} data manipulation packagetidyr.tidyverse.org - {tidyr} data tidying packagepurrr.tidyverse.org - {purrr} functional programming packagereadr.tidyverse.org - {readr} data reading packagestringr.tidyverse.org - {stringr} string manipulation packageforcats.tidyverse.org - {forcats} categorical data packageR Package Repositories:
cran.r-project.org - The Comprehensive R Archive Networkcloud.r-project.org - CRAN mirror (cloud-based)docs.ropensci.org - rOpenSci package documentation (e.g., {targets})rdatatable.gitlab.io - {data.table} package documentationrstudio.github.io - RStudio-maintained packages (e.g., {renv})Code Style and Quality Tools:
styler.r-lib.org - {styler} code formatting packagelintr.r-lib.org - {lintr} code linting packageroxygen2.r-lib.org - {roxygen2} documentation packagestyle.tidyverse.org - Tidyverse style guideGeneral Documentation and Reference:
en.wikipedia.org - General reference and technical documentationr-project.org - Official R project websitequarto.org - Quarto publishing system documentationpandoc.org - Pandoc document converter documentationGitHub Organizations (for package repositories):
github.com/tidyverse/* - Tidyverse package source codegithub.com/r-lib/* - R-lib package source codegithub.com/rstudio/* - RStudio package source codegithub.com/ropensci/* - rOpenSci package source codeWhen to Add These URLs
Add these URLs to your repository’s allowlist if:
You can add URLs selectively based on your project’s specific dependencies rather than adding all URLs at once.
Safety of These URLs
All URLs listed here are:
These sites do not host user-generated content or allow arbitrary code execution, making them appropriate for inclusion in your allowlist.
Some environments restrict or prohibit internet access—high-performance computing (HPC) clusters, hospital networks, or air-gapped research servers may block connections to cloud AI providers. Running a local AI model lets you use coding assistance in these settings without sending code to external servers, which also addresses data-privacy concerns when working with sensitive or confidential data.
Trade-offs of Local vs. Cloud Models
Local models work best with a GPU (roughly 8 GB VRAM or more for smaller models); CPU-only inference is possible but significantly slower, and hardware needs vary with model size and quantization. They are generally less capable than frontier cloud models, and may produce lower-quality results on complex tasks. For routine work in fully connected environments, cloud-based agents remain the better choice. Use local models when network access or data-privacy policies require it.
Ollama is a common way to run open-weight AI models locally. It packages models and a simple API server into a single tool and is available for macOS, Linux, and Windows.
Install Ollama:
Caution
Before running any remote install script, review it first. The real risk is piping curl straight into sh/bash (curl ... | sh), which executes unreviewed code. Save the script, read it, then run it: curl -fsSL https://ollama.com/install.sh -o install.sh && less install.sh (paging the saved file rather than piping curl into less, which can behave oddly in some terminal emulators). Alternatively, use your system package manager (e.g., brew install ollama on macOS) or follow the manual installation steps on the Ollama releases page.
On Windows, download the installer from https://ollama.com/download.
Pull a code-focused model:
The VRAM each model needs depends on its size and quantization and changes as models are re-quantized—check the Ollama model library for current requirements. As a rough guide, smaller (7B) models run on consumer GPUs with around 8 GB of VRAM, while larger (32B and 70B) models need substantially more and may not fit on a single GPU.
Start the Ollama server:
By default the server listens at http://localhost:11434.
Positron supports Ollama natively through the OpenAI-compatible API endpoint that Ollama exposes.
Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux).http://localhost:11434/v1 and leave the API key blank, or, if the client rejects an empty field, enter any placeholder value such as ollama.qwen2.5-coder:7b).Once configured, Positron Assistant will send requests to your local Ollama server instead of a cloud provider.
Continue is an open-source VS Code extension that supports Ollama and many other local and cloud backends.
Continue provides inline completions and a chat panel, similar to GitHub Copilot, but routed entirely to your local model.
The editor integrations above provide inline completion and chat. For an autonomous agent that reads your files, proposes edits across a whole repository, and commits them to git—the local counterpart to a cloud coding agent—aider works directly against Ollama.
Install it in an isolated environment so its dependencies do not collide with other tools:
Point it at Ollama and choose a model with the ollama_chat/ prefix, which gives better results in aider than the plain ollama/ prefix:
Raise the Ollama context window
By default Ollama uses a 2048-token context window, which silently truncates your code and makes the model look far less capable than it is. This is the single most common mistake when pairing aider with Ollama. Raise it with a model-settings file at ~/.aider.model.settings.yml:
Larger values (16384, 32768) handle bigger files at the cost of more memory; pick the largest your machine can comfortably hold.
To avoid passing flags every time, set defaults in a config file at ~/.aider.conf.yml:
aider can also split the work between two models in “architect” mode: a larger model plans the change (the architect), and a second model applies the edits (the editor).
This can improve results on multi-step changes, but on a machine without a strong GPU it roughly doubles the time per turn, because the two models take turns and their weights are swapped in and out of memory. Reserve it for genuinely tricky changes; for small edits, a single model is faster.
Air-gapped work aside, the common case is a laptop that is usually online but sometimes is not—on a plane, behind a flaky hospital network, or temporarily rate-limited by a cloud provider. You can keep a coding agent working across these gaps by putting a cloud model and a local model behind one endpoint and falling back automatically.
LiteLLM runs a small local proxy that presents a single OpenAI-compatible endpoint. You give it a primary model and one or more fallbacks; when the primary fails with a retryable error—a rate-limit response (HTTP 429), or a connection error when you are offline—it retries the request on the next model. Pointing your agent at the proxy instead of directly at a provider makes the cloud-to-local switch automatic and invisible to the tool.
Install the proxy:
Create a config file (for example, ~/.litellm/config.yaml) with a cloud primary and a local fallback:
model_list:
# Cloud primary --- replace with your provider and a current model id
- model_name: coder
litellm_params:
model: anthropic/YOUR-MODEL-ID
api_key: os.environ/ANTHROPIC_API_KEY
# Local fallback, served by Ollama
- model_name: coder-local
litellm_params:
model: ollama_chat/qwen2.5-coder:7b
api_base: http://localhost:11434
litellm_settings:
num_retries: 2
fallbacks:
- coder: ["coder-local"]Run the proxy, which listens on http://localhost:4000:
Then point your agent at the proxy. Because the proxy speaks the OpenAI API, most tools accept it as a custom endpoint. For aider:
Requests now go to the cloud model when it is reachable and fall back to the local model on a rate limit or when you are offline.
A cloud API key is separate from a chat subscription
The cloud side needs an API key billed per token, issued from the provider’s developer console. A chat subscription such as Claude Pro or a Copilot seat is not an API key and cannot be used here. Omit the cloud entry entirely to run local-only, or add the key later to enable the hybrid.
Keep the proxy on loopback
By default the proxy binds to localhost, which is what you want. Do not expose it on 0.0.0.0 on a shared or untrusted network without authentication, because anyone who can reach the port can spend your cloud API key.
Many HPC clusters do not have outbound internet access on compute nodes but do allow access on login nodes.
Install the Ollama binary on the cluster first
Ollama must be installed on the cluster (on the host that will run ollama serve) before any of the steps below. On most HPC systems you do not have root access, so the curl | sh installer may fail or install to the wrong place. Instead, check whether your cluster already provides it (e.g., module load ollama), ask your HPC administrators, or download a static binary from the Ollama releases page and place it on your PATH.
A useful pattern:
Pre-pull models on a login node or a machine with internet access, then copy the model files to the cluster:
Watch your home-directory quota
Model files are large—qwen2.5-coder:7b is ~4 GB and qwen2.5-coder:32b is ~20 GB—and most HPC home directories have tight quotas (often 10–50 GB). Filling your home directory can break other jobs. Redirect model storage to a scratch or project filesystem with OLLAMA_MODELS and rsync to that path instead:
Set the same OLLAMA_MODELS value before running ollama serve so the server finds the models.
Start Ollama on a compute node (or an interactive session) using the pre-downloaded model files—no internet required. Set OLLAMA_HOST=0.0.0.0 so the SSH tunnel from the login node can reach the port:
If you are on a shared compute node, be aware that binding to 0.0.0.0 exposes the Ollama port to other users on that host. Scheduler policies vary by site and job type, so confirm whether your job has exclusive node access (request it explicitly when in doubt—e.g., --exclusive in SLURM), or bind only to loopback (OLLAMA_HOST=127.0.0.1:11434) and tunnel from the login node when the node is shared.
Forward the port to your local machine to use your editor’s Ollama integration. Because Ollama is running on a compute node (e.g., gpu-node-01), forward through the login node to that specific host:
This terminal must stay open for as long as you use the editor’s Ollama integration—closing it tears down the tunnel and silently drops the connection. Alternatively, start the tunnel in the background (non-interactive) so it does not occupy a terminal:
(-N runs no remote command, -f backgrounds ssh after authenticating.) To stop the tunnel later, match the full SSH command rather than a bare port string—pkill -f "ssh.*-N.*11434:gpu-node-01"—so you don’t accidentally kill unrelated processes whose command line happens to contain that port. Safer still, note the PID when you start it (pgrep -f "11434:gpu-node-01") and kill that PID directly.
Then configure your editor to use http://localhost:11434/v1 as the base URL.
SLURM and GPU Allocation
If running Ollama on a SLURM-managed cluster, request a GPU node with enough VRAM for your chosen model and load any required CUDA modules before starting ollama serve. See the UCD-SERG Lab Manual’s SLURM chapter for guidance on requesting GPU resources.
Running a model locally ensures that your code and prompts never leave your machine or cluster. This is important when working with:
Even with local models, avoid including raw sensitive data in prompts. Work with anonymized or synthetic data wherever possible.
GitHub Copilot offers numerous configuration options that control how the AI assistant integrates into your development workflow. This section explains the key settings visible in your GitHub account preferences and provides guidance on which options to enable based on your use case.
GitHub Copilot provides access to multiple AI models, each with different capabilities and performance characteristics. The available models as of early 2026 include:
Anthropic Claude Models:
OpenAI GPT Models:
As of 2026-05-08, OpenAI points users to ChatGPT Codex at chatgpt.com/codex. The OpenAI quickstart describes Codex as an AI coding assistant available through the Codex IDE extension that can read files, run commands, and write changes. This quickstart guide also links to a dedicated Codex app for working with local projects: OpenAI Codex quickstart guide. For additional background and platform context, Wikipedia describes Codex as an AI coding agent by OpenAI with desktop app availability on Windows and macOS as an additional access path: Codex (AI agent). In the GitHub Copilot model names shown below, the -Codex suffix identifies code-specialized variants (for example, GPT-5.2-Codex and GPT-5-Codex).
If you are using Positron Assistant with OpenAI models, set up an OpenAI API key first.
Follow these steps:
Cmd+Shift+P (or Ctrl+Shift+P on Windows/Linux).Positron Assistant: Configure Language Model Providers.The Positron Assistant getting started guide states that OpenAI is enabled by default. If OpenAI does not appear as a provider, update Positron and confirm positron.assistant.provider.openAI.enable is not disabled.
Sources: Positron Assistant setup, OpenAI API key help, OpenAI quickstart.
Google Gemini Models:
Lab Recommendation: For most lab work, enable Claude Sonnet 4.5 as your default model. It provides excellent balance of capability and speed. Consider switching to Claude Opus 4.5 for complex architectural decisions or difficult debugging sessions. Keep Claude Haiku 4.5 enabled for quick inline completions.
These settings control where and how Copilot integrates into your development environment:
Editor preview features:
Copilot Chat in GitHub.com:
Copilot CLI:
gh extension install github/gh-copilotCopilot in GitHub Desktop:
Copilot Chat in the IDE:
Copilot Chat in GitHub Mobile:
Copilot can search the web:
Dashboard Entry Point:
Copilot code review:
Automatic Copilot code review:
Copilot coding agent:
Copilot Memory (Preview):
MCP servers in Copilot:
Copilot-generated commit messages:
Copilot Spaces:
Copilot Spaces Individual Access:
Copilot Spaces Individual Sharing:
For lab members, we recommend the following configuration:
Enable these features:
Model selection:
Enable with caution:
Following these guidelines will help establish an effective Copilot configuration. The key is to enable features that add value to your workflow while maintaining awareness that AI assistance requires validation (see Section 14).
VS Code’s built-in Chat usually talks to GitHub’s hosted models. It can also route requests to a model provider of your own; GitHub calls this “bring your own key” (BYOK). The lab uses BYOK to reach Databricks model serving endpoints, which expose an OpenAI-compatible API, through the community extension oai-compatible-copilot.
This section describes the wiring and three errors you are likely to hit.
Databricks serves models over an OpenAI-compatible endpoint at https://<workspace>.cloud.databricks.com/serving-endpoints. Point the extension at it in VS Code settings.json:
The id of each model must exactly match the name of a deployed serving endpoint in your workspace. The extension sends id as the OpenAI model field, and Databricks routes POST /serving-endpoints/chat/completions to the endpoint of that name. An id that names no real endpoint fails (see the 404 below).
To store your token, run Set OAI Compatible Multi-Provider Apikey from the Command Palette (Cmd+Shift+P / Ctrl+Shift+P), choose the databricks provider, and paste a Databricks personal access token. The extension keeps it in VS Code’s encrypted secret storage (under oaicopilot.apiKey.databricks) and sends it as an Authorization: Bearer header.
These failures sit on top of each other: fixing one uncovers the next, so work through them top-down.
1. “No utility model is configured for ‘copilot-utility-small’”
When your main Chat model is a BYOK model, VS Code still needs a small “utility” model for background chores such as generating the conversation title and naming git branches. If none is configured, Chat fails before it ever reaches your provider:
No utility model is configured for 'copilot-utility-small'
while the selected main agent model is BYOK.
Set chat.byokUtilityModelDefault in settings.json:
"mainAgent": reuse your BYOK main model for these chores. This keeps all traffic on your provider and needs no extra endpoint, so it is the simplest choice."copilot": use GitHub’s hosted utility model. This needs an active Copilot subscription."none": the default, which errors on purpose.This requirement arrived in a mid-2026 VS Code update. Before that, BYOK chat worked without the setting, so an editor update can make a working setup start failing here.
2. [404] ENDPOINT_NOT_FOUND
[404] Not Found
{"error_code":"ENDPOINT_NOT_FOUND",
"message":"The given endpoint does not exist, please retry after
checking the specified model and version deployment exists."}
The model name in the request is not a serving endpoint that exists in the workspace. Check that every id in oaicopilot.models matches a real, deployed endpoint (Databricks workspace → Serving), and remove or rename any entry that points at a name with no deployment. A stray placeholder entry, such as a leftover copilot-utility-small, is a common cause.
3. [403] Invalid access token
[403] Forbidden
{"error_code":403,"message":"Invalid access token."}
The stored token is expired or revoked. Databricks OAuth tokens are short-lived and can expire within the day, so a session that worked in the morning can start returning 403 by afternoon; personal access tokens last until their configured expiry. Generate a fresh token (Databricks → Settings → Developer → Access tokens) and re-run Set OAI Compatible Multi-Provider Apikey. Prefer a long-lived personal access token to avoid frequent re-authentication. No window reload is needed; the extension reads the token on each request.
Tip
A quick way to tell 404 from 403: a 404 means the request authenticated but named a missing endpoint (a model-name or configuration problem), while a 403 means the token itself was rejected (an authentication problem).
The .github/workflows/copilot-setup-steps.yml file allows you to customize the development environment in which the GitHub Copilot coding agent operates. This file preinstalls tools and dependencies so that Copilot can build, test, and lint your code more reliably.
While Copilot can discover and install dependencies through trial and error, this can be slow and unreliable. Additionally, Copilot may be unable to access private dependencies. Preconfiguring the environment ensures:
The workflow file must be located at .github/workflows/copilot-setup-steps.yml in your repository’s default branch. It follows GitHub Actions workflow syntax but must contain a single job named copilot-setup-steps.
See this repository’s own .github/workflows/copilot-setup-steps.yml for a configuration adapted for R and Quarto projects.
actions/checkoutThe actions/checkout action is used to check out your repository code so that the workflow can access it. While Copilot will automatically check out your repository if you don’t include this step, explicitly including it is necessary when your setup steps need to access repository files.
Why explicitly include checkout?
Many dependency installation steps require access to repository files:
r-lib/actions/setup-renv@v2 needs renv.lock to install R package dependenciesr-lib/actions/setup-r-dependencies@v2 needs DESCRIPTION to install R package dependenciesnpm ci needs package-lock.json to install Node.js dependenciespip install -r requirements.txt needs the requirements fileWithout an explicit checkout step, these dependency installation commands will fail because the necessary files won’t be available yet.
Basic checkout:
Important: The Copilot coding agent overrides any fetch-depth value you set in the checkout step. According to GitHub’s official documentation, this override happens “to allow the agent to rollback commits upon request, while mitigating security risks.” The agent dynamically determines the appropriate fetch depth based on the pull request context.
While you cannot control the fetch depth used by Copilot, the agent still has access to sufficient git history to perform its work effectively, including comparing changes and understanding the context of your pull request.
You can customize only these specific settings in the copilot-setup-steps job:
steps: Setup commands and actions to runpermissions: Access permissions (typically contents: read)runs-on: Runner type (Ubuntu x64 Linux only)services: Database or service containerssnapshot: Save environment statetimeout-minutes: Maximum 59 minutesAll other workflow settings are ignored by Copilot.
For Node.js/TypeScript projects:
For Python projects:
For R projects:
To set environment variables for Copilot:
copilot environmentUse secrets for sensitive values like API keys or passwords.
The workflow runs automatically when you modify copilot-setup-steps.yml, allowing you to validate changes in pull requests. You can also manually trigger the workflow from the repository’s Actions tab.
Setup logs appear in the agent session logs when Copilot starts working. If a step fails, Copilot will skip remaining steps and begin working with the current environment state.
Larger runners: For projects requiring more resources, you can use larger GitHub-hosted runners:
Self-hosted runners (ARC): For access to internal resources or private registries, use Actions Runner Controller (ARC) self-hosted runners:
Note: When using self-hosted runners, you must disable Copilot’s integrated firewall in repository settings and configure appropriate network security controls.
Git Large File Storage (LFS): If your repository uses Git LFS:
For complete details, see Customizing the development environment for GitHub Copilot coding agent.
Agent Skills are a lightweight, open standard for extending AI agent capabilities with specialized knowledge and workflows. The specification defines a portable, tool-agnostic format that any compatible agent can load.
At its core, a skill is a folder containing a SKILL.md file. This file includes the name and description metadata required by the specification, along with instructions that tell an agent how to perform a specific task. Skills can also bundle supporting resources:
my-skill/
├── SKILL.md # Required: metadata + instructions
├── scripts/ # Optional: executable code
├── references/ # Optional: documentation
└── assets/ # Optional: templates, resources
The specification describes a progressive disclosure model, in which an agent typically loads a skill in three stages:
SKILL.md instructions into context.This means full instructions load only when needed, so agents can maintain many skills with a small context footprint.
Skills package procedural knowledge and team-specific context into portable, version-controlled folders. This gives agents:
For the complete specification and more details, see agentskills.io.
The d-morrison/ai-config repository contains an example of personal Claude Code configuration, including user-level skills and slash commands, synced across machines via Git.
Claude Code is a CLI coding agent that can also run tasks on Anthropic-managed cloud infrastructure— either from the web at claude.ai/code (“Claude Code on the web”), or from the terminal by adding the --remote flag to move a session into the cloud.
Each cloud run executes inside a configured environment. An environment bundles three things:
NODE_ENV, database URLs, or API keys./remote-envThe /remote-env slash command sets which configured environment is the default for --remote runs:
/remote-env only selects the default; to add, edit, or archive the environments themselves, use the web interface at claude.ai/code. Because /remote-env opens an interactive panel, run it from an interactive claude terminal session.
Availability
Claude Code on the web (and the cloud environments it relies on) is a research-preview feature, available to Pro, Max, and Team users (and Enterprise users with eligible seats). Availability and behavior may change.
For details, see the Claude Code on the web documentation and the slash command reference.
Coding agent sessions are currently1 considered “premium requests”, which are limited resources; see https://github.com/features/copilot/plans for details. So, use coding agents sparingly. Use them for complex changes that would be difficult or time-consuming for you to complete by hand. Coding agents also take time to get configured for work, every time you make a request. See https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment#preinstalling-tools-or-dependencies-in-copilots-environment for ways to reduce that startup time, but it will never be 0. If you can complete the task faster than the coding agent can, you should probably do it yourself. For example, when you have errors in the spell-check or lint workflows, you can often fix them faster than Copilot can. Similarly, when reviewing Copilot’s PRs, you can often make direct changes to the branch faster than you could write clear review comments and get Copilot to address them.
Also, the less we practice, the weaker our skills get, and the harder it is for us to supervise the agents and make sure they are actually doing what we want them to do, the way we want them to do it. You should exercise your own coding skills regularly, just like you would for any other skill you want to maintain.
.docx filesGitHub Copilot coding agents can read Microsoft Word (.docx) files, including tracked changes and comments. This enables a hybrid editing workflow where:
.docx file and translate the edits back to Quarto formatWhen using this workflow, make sure to explicitly instruct the coding agent to:
.docx file.docx fileThis approach makes it easier for collaborators who are more comfortable with Word to contribute while maintaining the source files in Quarto format.
When opening DOCX files generated by Quarto (including this site), Microsoft Word may display a warning message and open the file with the title “Document 1” instead of the actual filename. Word may also require you to save the file before you can add comments or track changes.
This is a known limitation with how Quarto generates DOCX files. The issue is being tracked in the Quarto project:
Workaround: If you are the author generating the DOCX file from Quarto, follow these steps before sharing with collaborators:
This one-time step ensures that when collaborators open the file, they won’t see the “Document 1” warning and can immediately add comments and track changes without issues.
A .github/copilot-instructions.md file contains repository-specific instructions and guidelines for GitHub Copilot coding agents. This file helps ensure that AI-generated contributions follow the project’s formatting standards, coding conventions, and documentation practices.
For a Quarto-based repository like this one, the copilot instructions file typically specifies:
|>, following tidyverse style)By having these instructions in .github/copilot-instructions.md, you ensure that coding agents produce consistent, high-quality contributions that align with the project’s established practices. This reduces the review burden and helps maintain consistency across all contributions, whether made by humans or AI assistants.
See this repository’s own .github/copilot-instructions.md for a working example.
Before requesting review from other humans, always have Copilot review your pull request first—even if Copilot created the PR itself. AI review provides fast, thorough feedback that helps catch issues before involving human reviewers, saving everyone time and improving code quality.
Why review with Copilot first:
Copilot review workflow:
Assign Copilot as a reviewer: On your pull request page, assign Copilot to review the PR the same way you would assign any other reviewer. Click “Reviewers” in the right sidebar and select Copilot from the list.
Review Copilot’s comments: Once Copilot completes its review, carefully examine each comment. For each comment, decide whether you agree with the suggestion:
Request another Copilot review: After addressing or dismissing all comments, request another review from Copilot. This creates an iterative improvement process.
Iterate until satisfied: Repeat the review-and-address cycle until Copilot stops providing valuable suggestions. This typically takes 1-3 iterations depending on the complexity of the changes.
Request human review: Only after you’ve addressed Copilot’s feedback should you request review from human team members. At this point, the code should be in better shape, allowing human reviewers to focus on higher-level concerns.
Important considerations:
For pull request authors:
Even if you’re highly experienced, treating Copilot review as a required pre-review step helps maintain code quality and makes the best use of everyone’s time. The few minutes spent on Copilot review often save hours of back-and-forth with human reviewers.
For human reviewers:
When you receive a PR for review, check whether the author has completed the Copilot review process. If Copilot hasn’t reviewed the PR yet, consider asking the author to complete that step first before you invest time in review. This ensures you’re reviewing code that has already been through initial automated quality checks.
When reviewing a pull request where someone else prompted Copilot to make changes, follow these guidelines to avoid confusion and ensure smooth collaboration:
Understanding PR roles:
The general PR roles (issue creator, author, reviewer, merger, assignee, and PR steward) are described in the UCD-SERG Lab Manual’s GitHub chapter. Copilot-assisted workflows add two more:
The scenario:
As a non-manager reviewer, your role is to provide feedback, not to directly initiate more work by Copilot. The PR manager should remain in control of when and how Copilot makes additional changes.
Recommended review workflow:
For PR managers:
After receiving reviews from other team members:
Transferring the PR manager role:
The original PR manager can hand over a PR to another person, who then becomes the new PR manager with control over Copilot’s work on that PR. This might be useful when:
To transfer the PR manager role:
This workflow ensures the PR manager maintains control over the development process while benefiting from collaborative human review and Copilot’s implementation capabilities.
Claude Code is Anthropic’s command-line coding agent. Installing it on Windows works well, but a few platform-specific pitfalls can cost you hours if you don’t know about them. These notes capture a setup that works, and the gotchas to watch for.
Note
These notes were written in June 2026. As with the rest of this chapter, treat the specifics with caution— installers and behavior change quickly.
Claude Code expects a Unix-like shell. On Windows, run it from one of:
pacman) and optional zsh;If you use WSL, install Claude Code inside WSL— a Windows install will not carry over, because WSL has its own filesystem and PATH. Inside WSL the standard Linux install applies, and the Windows-specific PATH and rehash gotchas below don’t apply.
There are two common routes:
Native installer (recommended):
This installs the binary to ~/.local/bin. If your organization’s policy requires it, download and inspect the script before running it rather than piping it straight to bash.
npm (requires Node.js):
Claude Code migrates itself out of npm
Even if you install via npm, current versions migrate themselves to a native install the first time you run claude (at ~/.local/bin/claude, or ~/.local/bin/claude.exe on Windows) and remove the npm copy. You can watch this happen in the terminal output the first time you run claude; the current install methods are documented in the Claude Code setup guide.
This is the single most confusing Windows gotcha: a path that worked a moment ago “disappears.” Do not hardcode the npm location (e.g. .../AppData/Roaming/npm/...) in your shell config. Point your PATH at the shell-appropriate directory shown in the next section instead.
claudeThe native binary lives in ~/.local/bin. The installer adds this directory to PATH for ordinary shells, but on Windows two things commonly break that.
MSYS2 does not inherit the Windows PATH by default. It starts in a “minimal” path mode, so tools installed elsewhere on Windows are invisible to it. Add the binary’s directory explicitly in your ~/.zshrc (or ~/.bashrc). Because MSYS2’s $HOME is /home/<you> (its own home, not the Windows profile where the installer puts the binary), point PATH at the absolute Windows path:
In Git Bash, $HOME already is /c/Users/<you> (your Windows user profile), so the shorthand works there:
Rehash after changing PATH. zsh and bash cache the locations of executables. If you add a directory to PATH in your shell config, the shell may still report command not found even though the directory is on PATH, because its command table is stale. Force a rebuild in the same shell right after editing PATH:
This bites hardest with oh-my-zsh, which builds zsh’s command table before your custom PATH line runs, so opening a fresh window may not clear the stale command not found on its own until you rehash (or move the PATH line before oh-my-zsh initializes).
PowerShell writes the wrong encoding
Never write to ~/.bashrc, ~/.zshrc, or other shell config files using PowerShell’s > or >> redirection. Windows PowerShell writes UTF-16 with a byte-order mark, which bash/zsh read as a stray character at the start of the file:
bash: $'\377\376export': command not found
Edit dotfiles from inside the shell (e.g. with nano, vim, or echo 'export PATH=...' >> ~/.zshrc run in bash/zsh), or with an editor that saves UTF-8 without a BOM (e.g. VS Code).
If you also use the GitHub CLI (gh) to push code or open pull requests, gh auth login may fail with:
could not prompt: … running in MinTTY without pseudo terminal support
Git Bash and MSYS2 both default to the MinTTY terminal, which can’t host the interactive prompt. Wrap the command with winpty, or run it from PowerShell / Windows Terminal instead:
winpty ships with Git Bash, but in MSYS2 it’s a separate package — install it first with pacman -S winpty if you get command not found.
Open a new terminal window (so it picks up your updated config) and run:
If you get a version number, you’re ready to run claude in your project directory. If you get command not found, re-check the two PATH issues above: the directory must be on PATH, and you must rehash (or open a fresh window) after changing it.