# Coding Agent CLI Tool Placement

Decision heuristic for where to keep autonomous coding agent CLIs across a two-machine setup (headless GPU server + desktop).

## The Setup

| Machine | Role | Key hardware | Display | Package sources |
|---------|------|-------------|---------|----------------|
| **Debian** (192.168.1.50) | Headless GPU server | RTX 2080 Ti 11GB | None (SSH/Tailscale) | npm, pipx, standalone |
| **CachyOS** (192.168.1.111) | Desktop | RTX 3070 | KDE Plasma | AUR, pacman, npm, flatpak, snap |

## Placement Rules

### Put on the Desktop (CachyOS)

Tools that are **GUI-oriented** or need an interactive editor/display:

| Tool | Reason |
|------|--------|
| **Cursor IDE** | Desktop app — needs KDE/display server |
| **Cursor Agent** (CLI) | Optional both — if used via GUI, keep on desktop; if used headless, put on server |
| **VS Code** | Full IDE — desktop only |

### Put on the Server (Debian)

Tools that are **CLI-only, headless, or benefit from GPU colocation**:

| Tool | Reason |
|------|--------|
| **Claude Code** | Headless CLI — colocated with GPU for local inference + no power management interrupts long runs |
| **Codex CLI (OpenAI)** | Headless CLI — same rationale; also can use local models via OpenAI-compatible endpoints on the server |
| **Command Code** | CLI-only — no display needed, benefits from being always-on |

### Can be on Both (no strong preference)

| Tool | Notes |
|------|-------|
| **tiny-agents** | Ships with huggingface-hub, present wherever `pipx install huggingface-hub` was run. Harmless either way. |

## Heuristic Summary

```
Is the tool a desktop app (GUI, Electron)?
  → Desktop (CachyOS)
Is the tool a headless CLI?
  → Server (Debian) — colocated with GPU + always-on
Does the tool need VS Code / interactive editing?
  → Desktop (CachyOS)
Is the tool just a wrapper that calls local LLM inference?
  → Server (Debian) — no network hop to llama-swap
```

## Why Server for Headless Agents

1. **GPU colocation**: Agents that need to run code or evaluate models can call `localhost:9292` (llama-swap) directly — no network latency, no auth, no rate limits.
2. **Always-on**: Desktop machines sleep, hibernate, get rebooted for gaming, and have power management that can kill long-running agent tasks. The server stays up.
3. **Resource isolation**: Long agent runs don't compete with KDE, browsers, or games for RAM/CPU on the desktop.
4. **SSH'able from anywhere**: Agents on the server can be kicked off from phone (Termux) or any machine on LAN/Tailscale.
