Agentic coding
Agentic coding goes beyond chat and inline suggestions. These tools leverage the model’s ability to autonomously complete multi-step tasks. It’s able to read your codebase, edit files, and run terminal commands.
Info
Comparison with commercial models: The Commercial Models - Agentic coding page covers agentic coding workflows using external providers such as Codex and Claude Code. OpenCode and Claude Code support both commercial-provider API keys and a SAIA API key; the sections below describe the SAIA setup for both. The tools described below provide comparable agentic coding capabilities using your SAIA API key and models hosted on GWDG’s HPC infrastructure. This allows users to benefit from modern coding assistants while keeping data processing within the institute’s infrastructure, helping to meet data protection, compliance, and confidentiality requirements. For many research and administrative use cases, this provides a practical alternative to external AI services without sacrificing core agentic coding functionality.
To use the internal models hosted on our platform with the below mentioned tools, you need a SAIA API key. If you don’t have one yet, refer to SAIA API keys to request one. The external models are not available via the API.
Contents
Model Selection
For agentic coding workloads, we recommend starting with models that have agentic capabilities. You can select from the full list of available models.
Look for models that are optimized for:
- Agentic coding: Multi-file editing, codebase exploration
- Tool use: Terminal commands, web browsing, API interactions
- Reasoning: Complex problem-solving and planning
When selecting a model, check that it mentions agentic tasks or overall performance in its advantages section or in description. For complex agentic workflows, consider models with larger context windows (200K+ tokens) to handle extensive codebases and longer prompts effectively.
Tip
For agentic coding workloads, we suggest starting with devstral-2-123b-instruct-2512 or qwen3-coder-30b-a3b-instruct.
Both are specialized coding-agent models.
glm-4.7 is a general-purpose agentic model with strong coding, tool-use, terminal, and web-browsing capabilities.
Continue (Agent Mode)
Continue is primarily a code completion and chat tool, see the Code Completion section for full setup and installation. In addition to code completion, Continue also supports agentic workflows via its built-in Agent mode, where the model can autonomously read files, apply edits, and complete multi-step tasks.
To use Continue for agentic tasks:
- Open the Continue panel in VS Code
- Switch the mode dropdown in the continue panel from Chat to Agent
- Send a task, for example, ask it to refactor a function or add error handling. Continue will propose the changes and ask you to accept or reject them.
Note
For fully autonomous agentic workflows with more advanced tool use, OpenCode works particularly well with SAIA API keys.
OpenCode
OpenCode is an open-source, terminal-first AI coding agent that enables developers to generate code, modify files, execute commands, and automate development tasks directly from the terminal. OpenCode supports both self-hosted and commercial AI models through provider API keys, making it suitable for teams and developers who want to leverage state-of-the-art models while maintaining a terminal-centric workflow. Its design is particularly well suited for SSH sessions, remote HPC environments, CI/CD pipelines, and keyboard-driven development workflows. This section explains how to configure OpenCode with your SAIA API key. For commercial models, see the commercial models guide.
Tip
For local development we recommend running OpenCode in a sandboxed container, so the agent can only affect your current project and nothing else on your system. The steps below install OpenCode directly on your machine; for the sandboxed setup, see OpenCode in a sandboxed container at the end of this section.
Install
# npm
npm install -g opencode-ai
# or with curl
curl -fsSL https://opencode.ai/install | bashAfter installation, add OpenCode to your PATH:
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.bashrcOpen a new terminal and verify the installation:
opencode --versionSet your API key
Set your SAIA API key as an environment variable:
echo 'export SAIA_API_KEY="your-saia-api-key"' >> ~/.bashrcRun source ~/.bashrc or open a new terminal for the changes to take effect.
Create the project config
Create opencode.json in your project directory:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"saia": {
"npm": "@ai-sdk/openai-compatible",
"name": "SAIA",
"options": {
"baseURL": "https://chat-ai.academiccloud.de/v1",
"apiKey": "{env:SAIA_API_KEY}"
},
"models": {
"qwen3-coder-30b-a3b-instruct": {
"name": "Qwen3 Coder 30B (SAIA)"
},
"devstral-2-123b-instruct-2512": {
"name": "Devstral 2 123B (SAIA)"
}
}
}
}
}You can modify the opencode.json to choose any model of your choice and ensure the model id matches exactly with the SAIA available models.
Launch
# Interactive TUI
opencode
# One-off task example
opencode run "Write unit tests for all functions in src/utils.py"Models
| Command | Action |
|---|---|
/models | Open model selector to switch between SAIA models |
Tip
If models don’t show up, open a new terminal so SAIA_API_KEY is loaded, and check that it’s set (echo $SAIA_API_KEY).
If you’re running OpenCode inside VS Code terminal, reload the window (or restart VS Code) so it picks up the variable.
Modes
- Plan mode: Create structured plans for complex multi-step tasks, review and adjust steps before execution
- Build mode: Execute approved plans, run automation, and build workflows
Basic Commands
| Command | Action |
|---|---|
/help | Show available commands |
| Shift + Tab | Toggle between Plan and Build modes |
Adding Context
| Input | Action |
|---|---|
@ | File picker to add a specific file as context |
@filename | Directly reference a file by name |
During a Task
| Key | Action |
|---|---|
| Y or Enter | Approve a proposed file change |
| N | Reject a proposed file change |
| A | Approve all proposed changes at once |
For more information, see the official documentation.
OpenCode inside VS Code
If you prefer to stay in your editor, the OpenCode VS Code extension runs the same OpenCode agent.
It uses the same opencode.json and SAIA configuration from the steps above, so there’s nothing extra to set up.
- Open the Extensions view ( Ctrl + Shift + X on Linux, Command + Shift + X on macOS).
- Search for OpenCode and install it.
- Reload VS Code. OpenCode opens in a panel alongside your editor, where you can run tasks the same way as in the terminal.
Optional: SAIA model plugin
Instead of listing models by hand in opencode.json, you can install a plugin that keeps your SAIA model list up to date automatically.
On every OpenCode launch, it fetches the current model list from the SAIA API in the background and merges it into your global config, so new models appear without you editing anything.
It is available here: opencode-saia-plugin.
Make sure SAIA_API_KEY is set (see Set your API key), then follow the setup steps in the repository. It will fetch the live model list from the SAIA API and generate an opencode.json with all available models, categorized (reasoning, coder, vision, agentic, etc.)
Note
This plugin is developed by a GWDG team member as a side project, not an officially supported service. We can’t guarantee its behaviour in the future or provide support for it.
OpenCode in a sandboxed container (recommended)
For local development we recommend running OpenCode inside a container. The container mounts only your current project directory, so the agent can read and edit your project but cannot run commands that affect files anywhere else on your system. This is the recommended, secure way to use OpenCode locally.
You build an image once, then reuse it from any project. The image is generic. It is not tied to a specific project, and it won’t interfere with a Dockerfile your project may already have.
Prerequisites: Docker or Podman installed on your system.
One-time setup
You only do these four steps once.
1. Create a file named Dockerfile (capital D, no extension) in a dedicated folder of your choice (create one with mkdir opencode-sandbox).
This is the standard name that docker build uses by default.
Using a different name like dockerfile (lowercase) or Dockerfile.txt can cause the build to not find it, so stick with Dockerfile.
Paste the following code to your Dockerfile.
FROM node:20-slim
# Install OpenCode
RUN npm install -g opencode-ai
WORKDIR /workspace
CMD ["opencode"]If your projects need a particular language runtime (for example Python, or Python with uv), add it to this Dockerfile before building.
The container only has what you install here.
2. Build the image. From inside the folder that contains the Dockerfile, run:
cd opencode-sandbox # the folder where you saved the Dockerfile
docker build -t opencode-sandbox .The . means “build using the Dockerfile in the current folder”, so you don’t have to type the path. (Replace docker with podman if you use Podman.) You only repeat this step if you change the Dockerfile.
Confirm the image was created:
docker images | grep opencode-sandbox3. Add the run-opencode alias. The alias must be written into your shell config file (typing it once at the prompt only lasts for that terminal).
Here’s the one-step version that removes any old copies of aliases and adds the clean alias to ~/.bashrc in a single command:
sed -i '/alias run-opencode=/d' ~/.bashrc && cat >> ~/.bashrc << 'EOF'
alias run-opencode='docker run -it --rm --user "$(id -u):$(id -g)" -e HOME=/tmp -e SAIA_API_KEY="$SAIA_API_KEY" -v "$PWD":/workspace -w /workspace opencode-sandbox'
EOFNote
If you use zsh instead of bash (check with echo $SHELL if it ends in /zsh), add the alias to ~/.zshrc instead of ~/.bashrc, and source ~/.zshrc in the next step.
Adding it to ~/.bashrc will have no effect under zsh.
4. Reload your shell so the alias becomes available:
source ~/.bashrc # or: source ~/.zshrcVerify the alias is registered:
alias run-opencodeThis should print the alias definition back to you. If it does, the setup is complete.
Using it in a project
This is what you do every time you want to work on a project.
Note that you run run-opencode from inside the project you want to work on not from the sandbox folder where you built the image.
1. Make sure your API key is set in the current shell (see Set your API key):
echo $SAIA_API_KEY # should print your key, not be empty2. Go to the project you want to work on, and make sure it contains an opencode.json (the SAIA config from Create the project config):
cd ~/path/to/your/projectPlace opencode.json in the root of the project (the folder you run run-opencode from). The container mounts this folder as its working directory, so OpenCode picks the config up automatically. A global/home config on your host is not visible inside the sandbox, so each project needs its own.
3. Start the sandbox:
run-opencodeThis launches the container with the current folder mounted and starts OpenCode. The agent can read and edit the files in this folder, but nothing outside it.
Note
Because the container mounts only the current project directory, OpenCode cannot modify files outside it. This is what makes the setup a safe sandbox for agentic use. The project directory itself remains editable by the agent, which is intended.
Troubleshooting
run-opencode: command not found : the alias isn’t loaded in your shell. Check whether it made it into your config file:
grep -n run-opencode ~/.bashrc # or ~/.zshrc- If it prints nothing, the alias was never added to the file (it was probably only typed at the prompt). Repeat step 3 of the one-time setup, then
sourcethe file again. - If it prints the alias but the command still isn’t found, confirm you are editing the file your shell actually reads: run
echo $SHELL, and use~/.zshrcfor zsh or~/.bashrcfor bash. If OpenCode starts but can’t reach a model: then the key isn’t reaching the container, or the project has no valid config. Confirmecho $SAIA_API_KEYprints your key, and that the project directory contains a validopencode.json.
Tip
Keeping it alongside an existing Dockerfile: if you prefer to keep the sandbox Dockerfile inside a project that already has its own, give it a different name (for example Dockerfile.opencode) and build with docker build -f Dockerfile.opencode -t opencode-sandbox ..
Dependencies: the container only has what you put in the Dockerfile. If a project needs additional tools or system packages, add them to the Dockerfile and rebuild the image.
Claude Code (Secure Setup)
Claude Code is Anthropic’s terminal-first coding agent, also available as a VS Code extension. This setup runs it on the models in our cluster with just a SAIA API key, so your code and prompts stay on GWDG infrastructure.
Before you start
You need two things:
- A SAIA API key. If you don’t have one yet, request one here.
- Claude Code installed. Installation is the same as for the commercial setup, so follow the existing instructions: install the CLI or install the VS Code extension.
Only the configuration differs, and that is what the next section covers.
Configuration
Create or update ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json), paste the block below, and replace <your SAIA API key> with your own key:
{
"env": {
"ANTHROPIC_BASE_URL": "https://chat-ai.academiccloud.de",
"ANTHROPIC_AUTH_TOKEN": "<your SAIA API key>",
"ANTHROPIC_MODEL": "qwen3-coder-next",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "qwen3.6-27b",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "qwen3.5-397b-a17b",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "qwen3-coder-next",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "131072",
"CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING": "1",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"DISABLE_TELEMETRY": "1",
"DISABLE_ERROR_REPORTING": "1",
"DISABLE_BUG_COMMAND": "1",
"DISABLE_AUTOUPDATER": "1"
},
"permissions": {
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(~/.ssh/**)",
"Read(~/.aws/**)",
"Bash(git push:*)"
]
}
}Start a session with the claude command, or open the Claude sidebar in VS Code.
Because the settings file lives in your user profile, these values apply to every Claude Code session regardless of the shell it is started from.
Verifying the configuration works.
If you use the VS Code extension, additionally enable the user setting Claude Code: Disable Login Prompt so the extension does not ask for an Anthropic login.
You can also set it directly in your VS Code user settings.json:
{
"claudeCode.disableLoginPrompt": true
}Tip
The configuration above is all most people need. Everything below is reference material: what each setting does, how to switch models, and how the permission rules work. Come back to it when you need it.
Note
ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL are both required.
Without them, Claude Code requests Anthropic model names, which are not available through SAIA, and every request fails.
What the variables do
| Variable | Meaning |
|---|---|
ANTHROPIC_BASE_URL | Routes all requests to SAIA instead of Anthropic (without /v1) |
ANTHROPIC_AUTH_TOKEN | Your SAIA API key (sent as Authorization: Bearer) |
ANTHROPIC_MODEL | Main model used for the work |
ANTHROPIC_DEFAULT_HAIKU_MODEL | Model for background tasks such as titles and summaries |
ANTHROPIC_DEFAULT_OPUS_MODEL | Fills the “opus” slot in the /model list |
ANTHROPIC_DEFAULT_SONNET_MODEL | Fills the “sonnet” slot in the /model list |
CLAUDE_CODE_MAX_CONTEXT_TOKENS | Context window of the model. The example value is a placeholder, adjust it to the model set in ANTHROPIC_MODEL. The value per model is in the “Context window in tokens” column of the model list. Without it, Claude Code assumes 200,000 tokens |
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING | Not all internal models are reasoning models; for those the parameter has no effect and can cause errors |
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS | Prevents sending fields the backend does not evaluate |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | Switches off the remaining connections to Anthropic services. Changing the base URL only redirects model requests; telemetry, error reporting, and the auto-updater otherwise keep talking to Anthropic. This single variable covers most of it; the DISABLE_* variables below are set in addition and document the intent explicitly. It is also the prerequisite for a custom model list to survive (see way 3) |
DISABLE_TELEMETRY | No telemetry data to Anthropic |
DISABLE_ERROR_REPORTING | No error reports to Anthropic |
DISABLE_BUG_COMMAND | Disables the /bug command |
DISABLE_AUTOUPDATER | No automatic updates. Updating goes through your package or image process |
Deliberately set a small model for background tasks.
This noticeably reduces token consumption without affecting result quality.
Optionally, CLAUDE_CODE_SUBAGENT_MODEL in the same env block sets the model used for subagents.
Setting the reasoning level (“effort”) has no effect with the internal models.
A project-level .claude/settings.json in the repository applies in addition and is a convenient way to ship a preconfigured setup to a team.
The API key does not belong in that file, since it gets committed.
Put only the remaining variables there.
Switching models
There are three ways to choose a model. Way 1 is enough in most cases.
Way 1: type the model name directly (no configuration)
Typed in the running session, nothing is written to a file:
/model qwen3.5-397b-a17bAt startup, correspondingly:
claude --model qwen3.5-397b-a17bEvery model on the cluster is reachable this way, even when it does not appear in the picker list. You only need to know the model name.
Way 2: put three models into the picker list
The /model command opens a list containing three fixed slots labelled “opus”, “sonnet”, and “haiku”.
These three slots can be filled with SAIA models by adding the following to the env block in ~/.claude/settings.json:
"ANTHROPIC_DEFAULT_OPUS_MODEL": "qwen3.5-397b-a17b",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "qwen3-coder-next",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "qwen3.6-27b"The list then offers three SAIA models. The labels “opus”, “sonnet”, and “haiku” stay as they are; the models behind them are the ones you entered. This way offers no more than these three slots.
Way 3: put all models into the picker list.
This is optional and not officially supported. Two different files are involved:
- Prerequisite:
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"in theenvblock in~/.claude/settings.json. Without it, Claude Code overwrites the model list on every start. - Model list: at the top level of
~/.claude.json, a different file. Extend it with the key below while no session is running, do not replace the file:
"additionalModelOptionsCache": [
{"value":"qwen3-coder-next","label":"Qwen3 Coder Next","description":"Coding"},
{"value":"glm-4.7","label":"GLM 4.7","description":"Coding alternative"},
{"value":"qwen3.5-397b-a17b","label":"Qwen3.5 397B A17B","description":"Large, vision"},
{"value":"qwen3.5-122b-a10b","label":"Qwen3.5 122B A10B","description":"Mid-size, vision"},
{"value":"qwen3.6-35b-a3b","label":"Qwen3.6 35B A3B","description":"Fast, vision"},
{"value":"qwen3.6-27b","label":"Qwen3.6 27B","description":"Small, background tasks"},
{"value":"qwen3-30b-a3b-instruct-2507","label":"Qwen3 30B A3B","description":"Small, general purpose"},
{"value":"qwen3-omni-30b-a3b-instruct","label":"Qwen3 Omni 30B A3B","description":"Multimodal"},
{"value":"deepseek-v4-flash-0731","label":"DeepSeek V4 Flash","description":"Fast, general purpose"},
{"value":"openai-gpt-oss-120b","label":"GPT-OSS 120B","description":"General purpose"},
{"value":"mistral-medium-3.5-128b","label":"Mistral Medium 3.5","description":"General purpose, vision"},
{"value":"gemma-4-31b-it","label":"Gemma 4 31B IT","description":"General purpose, vision"},
{"value":"apertus-70b-instruct-2509","label":"Apertus 70B","description":"General purpose"},
{"value":"meta-llama-3.1-8b-instruct","label":"Llama 3.1 8B","description":"Very small"}
]value is the model ID; label and description are free display text.
The built-in entries (Default, Opus, Sonnet) stay visible but are not usable through SAIA.
The embedding models are deliberately omitted, as is devstral-2-123b-instruct-2512, which rejects requests from Claude Code.
Running /logout deletes the entry.
Permissions and sandboxing
Claude Code has file access and executes commands, so the same recommendation as for OpenCode applies: run it in a sandboxed container that mounts only your current project directory. The container is the outer security boundary; the permission system is the second layer, and it should be used rather than bypassed.
- Keep the permission prompt enabled. Avoid
--dangerously-skip-permissionsoutside a container sandbox, and even inside one it only makes sense for tasks with no network and no access to secrets. - Exclude access to secrets and unrelated directories with deny rules.
- Deny rules can also enforce that merges and deployments stay manual.
The deny rules go into ~/.claude/settings.json as a second block next to env, as shown in the configuration above.
That block can be extended, for example to cut off outbound web access:
{
"permissions": {
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(~/.ssh/**)",
"Read(~/.aws/**)",
"Bash(git push:*)",
"WebFetch",
"WebSearch"
]
}
}WebFetch and WebSearch can be omitted where your network rules already block outbound traffic; the deny rules make the restriction effective independently of the container configuration.
See permission modes for the full permission model.
Verifying the configuration
Before starting, check the URL and key independently of the tool:
curl -X POST "https://chat-ai.academiccloud.de/v1/messages" \
-H "Authorization: Bearer <your SAIA API key>" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"qwen3-coder-next","max_tokens":10,
"messages":[{"role":"user","content":"Test"}]}'A response containing "type":"message" confirms access.
Inside the session, run /status and check two lines:
Anthropic base URLmust showhttps://chat-ai.academiccloud.de. If the line is missing, the variable did not reach the session and the Anthropic API is still being used.Auth tokenmust nameANTHROPIC_AUTH_TOKEN. If aLogin methodline with a personal account appears instead, the SAIA key is not active.
Limitations
Claude Code is designed for Anthropic models, and the vendor explicitly does not support operation with other models. On larger tasks, expect weaker results than with the native models, particularly for tool use such as reading and editing files or running commands. OpenCode is provider-agnostic by design and is the better starting point if you run into such issues.
Cline
Cline is an open-source coding agent that combines large-language-model reasoning with practical developer workflows. This section outlines Cline’s main benefits, explains its Plan → Act interface, and walks through an installation that connects Cline to SAIA models.
The Plan → Act Loop
Plan mode: You can describe a goal, such as “add OAuth2 login”. Cline replies with a numbered plan outlining file edits and commands.
Review: Edit the checklist or ask Cline to refine it. Nothing changes in the workspace until you approve.
Act mode: Cline executes each step: editing files, running commands, and showing differences. You confirm or reject actions in real time.
This separation gives the agent autonomy without removing human oversight.
Installation Guide (VS Code)
Please find the installation steps below:
Prerequisites
- Visual Studio Code (v1.93 or newer)
- SAIA API key
- Node 18+ for optional CLI use
Extension installation
- Search Cline in VScode marketplace and install it.
Connecting to CoCo AI
Open Cline (Command Palette → “Cline: Open in New Tab”).
Click the Setup with own API Key and choose “OpenAI Compatible”.
Fill the fields:
Field Value Base URL https://chat-ai.academiccloud.de/v1API Key your SAIA API keyModel ID glm-4.7(add others as needed)Add additional models (e.g., qwen3-30b-a3b-instruct-2507) with the same URL and key if required.
Assign roles (if you want a different model for plan and act): For example, set glm-4.7 for Act; set qwen3-30b-a3b-instruct-2507 for Plan.
Daily Workflow
Here is the daily workflow:
Plan → Approve plan → Act → Review differences → Iterate
Cline bridges the gap between chat-based assistants and full IDE automation. With a short setup that points to CoCo AI, it becomes a flexible co-developer for complex codebases while preserving developer’s control.