Using the workspace

Dus inside your remote dev environment

Run Duscode's always-on runner inside a Coder workspace, a GitHub Codespace or any dev box you reach over SSH, and send every model call through your company's own LLM gateway so your auditors see it.

Many teams already work in remote development environments: a Coder workspace, a GitHub Codespace, or a shared dev box. Duscode fits into them in two ways:

  • The always-on runner in user mode. Jobs, Local CI and Watch keep going inside your workspace while your laptop is closed. Nothing needs root, sudo or a system service.
  • Your own LLM gateway. Every model call goes to your company's gateway (Coder's AI gateway, a LiteLLM proxy, or any OpenAI- or Anthropic-compatible proxy) with a token from your vault. Your auditors see Duscode's traffic in their own logs, and no AI vendor key is needed.

You can use either one on its own.

The runner inside your workspace

1. Make the workspace reachable over SSH

Duscode connects the way you do.

  • Coder: run coder config-ssh once on your computer. Each workspace becomes an SSH host such as coder.my-workspace.
  • GitHub Codespaces: run gh codespace ssh --config >> ~/.ssh/config once. Each codespace becomes an SSH host.
  • Any other box: an ordinary SSH login with a key works. Save the key in the vault.

Then ask Dus to save it as a deploy target, for example: "Save my Coder workspace coder.my-workspace as a target called dev, it's in my SSH config." For a host from your SSH config, your config signs you in. Duscode stores no key for it and leaves host checks to your config, since the Coder or GitHub proxy already proves which workspace it is.

2. Install the runner

Ask Dus to "install the always-on runner on dev". You get one approval card. Duscode picks user mode by itself when the host has no systemd or wasn't set up by Duscode, and the card says why. It lists exactly what will happen:

  • The Duscode engine is installed in your home folder, in ~/duscode-runner and ~/.duscode-runner. Node 22 is added in ~/.local/duscode-node only if the workspace has none.
  • Your project is copied over SSH. No GitHub login is needed there.
  • The runner runs at the lowest CPU priority. A workspace has no systemd, so there is no hard CPU or memory limit. The card says so.
  • No AI model key goes to the workspace unless you choose that. Jobs that need Dus to write code wait until your Duscode app takes them back.

3. Start it with the workspace

After the install, Duscode shows one line. Add it to your workspace's start script so the runner starts whenever the workspace does:

sh
[ -x "$HOME/duscode-runner/ensure.sh" ] && "$HOME/duscode-runner/ensure.sh" || true
  • Coder: add it to the agent's startup script, or to a coder_script that runs on start, in your template.
  • Codespaces: add it to postStartCommand in devcontainer.json.

Running it twice does no harm, because it starts the runner only when it isn't already running. Each time your Duscode app syncs with the runner, it runs this line too. So even a workspace started without it gets its runner back.

4. Stopping is safe

When a workspace stops, for example on an autostop schedule, the runner suspends its jobs and never cancels them. The next time the workspace starts, they continue from where they were, and Duscode tells you which jobs were suspended and resumed.

On Coder, also add this line to the agent's shutdown script, or to a coder_script that runs on stop, so jobs are suspended cleanly before the workspace goes:

sh
[ -x "$HOME/duscode-runner/stop.sh" ] && "$HOME/duscode-runner/stop.sh" || true

Without a stop hook (Codespaces has none), a stopped workspace looks like a power cut to the runner. Each step of a job is recorded as it happens, so the jobs still resume, and nothing is done twice.

Removing it

Ask Dus to "uninstall the runner from dev". After one card, the runner stops and its folders are removed. Duscode then checks your home folder against how it was before the install and tells you if anything is left. The start-script line can stay, because it does nothing once the runner is gone.

Your own LLM gateway

Open Settings → Models & keys → LLM gateway and fill in:

Field What to enter
Name What you call it. It appears on every Proof of Work.
Anthropic-compatible URL The gateway's base URL for Claude models (optional)
OpenAI-compatible URL The gateway's base URL for models served through OpenAI's API format (optional)
Vault name of the token e.g. LLM_GATEWAY_TOKEN
Token Your gateway token. It is saved in the vault and never shown to Dus.
Only through the gateway On by default: every other provider is switched off, so nothing bypasses your audit log

Duscode sends the token as Authorization: Bearer <token>. It sends no AI vendor key, even if one is set on your computer.

Duscode refuses two kinds of URL so your token and code never travel unprotected:

  • plain http:// anywhere except localhost
  • a URL with a user name or password in it

If the saved settings are wrong, no model call goes out at all rather than going around the gateway.

Coder AI Gateway

Coder's AI gateway (AI Bridge) authenticates with your Coder token, which you can create in your Coder account settings. Use your deployment's address:

  • Anthropic-compatible URL: https://coder.example.com/api/v2/aibridge/anthropic
  • OpenAI-compatible URL: https://coder.example.com/api/v2/aibridge/openai/v1

Check your Coder version's AI Bridge documentation for the exact paths.

LiteLLM

A LiteLLM proxy authenticates with a LiteLLM key (often a virtual key your admin gives you).

  • OpenAI-compatible URL: your proxy's address followed by /v1, e.g. https://litellm.example.com/v1
  • Anthropic-compatible URL: the address LiteLLM's documentation gives for its Anthropic-format endpoint

Any OpenAI-compatible proxy

Enter its base URL, the part before /chat/completions, as the OpenAI-compatible URL, and its token. Most company proxies, vLLM and similar servers work this way.

What your auditors see

  • Every model request from Duscode arrives at your gateway with your token.
  • Each task's Proof of Work names the gateway and its URL next to the models used, e.g. claude-sonnet via Coder AI Gateway (https://coder.example.com/api/v2/aibridge/anthropic).
  • The always-on runner uses the same gateway. Its settings go with the install. The token goes only if you allow model keys on the runner.

Setting DUSCODE_GATEWAY_ANTHROPIC_URL, DUSCODE_GATEWAY_OPENAI_URL, DUSCODE_GATEWAY_TOKEN_SECRET or DUSCODE_GATEWAY_NAME on a computer overrides the saved settings there, and Settings says when that happens.

Something missing or wrong? Email support@duscode.com.