tutorial

Monitoring Cline (Claude Dev) with Vigilmon

Cline is an autonomous AI coding agent for VS Code that runs a full agent loop — planning, executing commands, reading output, and iterating until a task is done. Here's how to monitor its local LLM backend, VS Code extension API, task queue, and supporting infrastructure with Vigilmon.

Cline (formerly Claude Dev) is an open-source autonomous AI coding agent that lives inside VS Code. Unlike simple autocomplete tools, Cline runs a full agent loop: it receives a task, plans steps, executes terminal commands, reads output, edits files, and iterates until the job is complete. When configured with a local model backend — Ollama on port 11434 or LM Studio on port 1234 — plus the Cline VS Code extension API on port 3000, every component in that chain must stay healthy for Cline to function. Vigilmon gives you continuous visibility into every layer, from the LLM inference server to the file system and browser automation process.

What You'll Set Up

  • Local LLM backend availability monitor (Ollama port 11434 or LM Studio port 1234)
  • Cline VS Code extension API health monitor (port 3000)
  • Model load status heartbeat (verify the model is loaded and ready)
  • Task queue and stalled-task alerting via heartbeat probe
  • File system health check (write access and disk space)
  • Browser automation process availability (Playwright/Puppeteer)
  • SSL certificate expiry alerts for reverse-proxy deployments

Prerequisites

  • Cline VS Code extension installed (version 3.0+)
  • A local LLM backend running: Ollama (port 11434) or LM Studio (port 1234)
  • Cline extension API enabled on port 3000 (optional but recommended for external integrations)
  • A free Vigilmon account

Step 1: Monitor the Local LLM Backend

Cline's agent loop depends entirely on the LLM backend to process each reasoning step. If Ollama or LM Studio crashes — common after a large model load, an OOM event, or a system suspend — Cline cannot execute any agent steps. A backend that is down but not monitored means silent task failure with no alert.

Ollama (port 11434)

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter: http://localhost:11434/ (or your LAN IP if Ollama is on a separate host, e.g. http://192.168.1.x:11434/).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

Ollama returns {"status":"running"} on its root endpoint when healthy. A connection refused or non-200 means Ollama has crashed or is still loading.

LM Studio (port 1234)

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: http://localhost:1234/v1/models.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

LM Studio's /v1/models endpoint returns the loaded model list. An empty list or non-200 status indicates no model is available for Cline to use.


Step 2: Monitor the Cline VS Code Extension API

Cline exposes an internal REST API on port 3000 used by external integrations, the Cline web UI, and task management scripts. If this API goes down, automated task submission and status queries fail even while the VS Code extension itself may appear functional.

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: http://localhost:3000/ (or the reverse-proxy URL if Cline's API is exposed externally).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 1 minute.
  5. Click Save.

Tip: If you expose the Cline API through a reverse proxy (nginx, Caddy), monitor the HTTPS proxy URL and enable SSL certificate monitoring in the same step (see Step 7).


Step 3: Heartbeat Monitor for Model Load Status

The LLM backend being up is a necessary but insufficient condition for Cline to work. The required model must also be loaded in Ollama or LM Studio before inference can begin. A freshly restarted Ollama instance with no model pulled, or an LM Studio session where the model was unloaded to free VRAM, will fail every Cline request.

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set Expected ping interval to 10 minutes.
  3. Copy the heartbeat URL (e.g. https://vigilmon.online/heartbeat/abc123).

Create a probe script check_model.sh:

#!/bin/bash
# Check that the required model is loaded and available in Ollama
MODEL="${CLINE_MODEL:-llama3.1:8b}"

RESPONSE=$(curl -s http://localhost:11434/api/tags)
if echo "$RESPONSE" | grep -q "\"$MODEL\""; then
  curl -s "https://vigilmon.online/heartbeat/YOUR_MODEL_HEARTBEAT_ID"
else
  echo "Model $MODEL not found in Ollama — heartbeat not sent"
fi

For LM Studio, probe the /v1/models response instead:

#!/bin/bash
RESPONSE=$(curl -s http://localhost:1234/v1/models)
MODEL_COUNT=$(echo "$RESPONSE" | python3 -c "import sys,json; d=json.load(sys.stdin); print(len(d.get('data',[])))")
if [ "$MODEL_COUNT" -gt 0 ]; then
  curl -s "https://vigilmon.online/heartbeat/YOUR_MODEL_HEARTBEAT_ID"
fi

Schedule every 10 minutes:

*/10 * * * * /path/to/check_model.sh

If the model is unloaded or evicted from VRAM, the heartbeat stops and Vigilmon alerts.


Step 4: Monitor Task Queue and Stalled Tasks

Cline processes one task at a time and maintains an internal task queue. A task that hangs — waiting on a hung subprocess, an unresponsive tool call, or an infinite agent loop — blocks all subsequent tasks indefinitely. There is no built-in max-duration enforcement, so long-running or stuck tasks require external monitoring.

  1. Click Add MonitorCron Heartbeat.
  2. Set Expected ping interval to 30 minutes (adjust to your longest expected task duration plus buffer).
  3. Copy the heartbeat URL.

Create a probe that queries the Cline API for task state and sends a heartbeat only if no task has been running beyond the max allowed duration:

#!/bin/bash
MAX_TASK_SECONDS=1800  # 30 minutes
NOW=$(date +%s)

# Query Cline API for current running task
TASK=$(curl -s http://localhost:3000/api/tasks/current)
if [ -z "$TASK" ] || echo "$TASK" | grep -q '"status":"idle"'; then
  # No task running — healthy idle state
  curl -s "https://vigilmon.online/heartbeat/YOUR_QUEUE_HEARTBEAT_ID"
  exit 0
fi

START_TIME=$(echo "$TASK" | python3 -c "import sys,json; t=json.load(sys.stdin); print(t.get('startedAt',0))")
ELAPSED=$(( NOW - START_TIME ))

if [ "$ELAPSED" -lt "$MAX_TASK_SECONDS" ]; then
  curl -s "https://vigilmon.online/heartbeat/YOUR_QUEUE_HEARTBEAT_ID"
else
  echo "Task stalled: running for ${ELAPSED}s (max: ${MAX_TASK_SECONDS}s)"
fi

Schedule every 15 minutes. If a task exceeds the expected window, the heartbeat stops and you receive an alert before the stall affects more work.


Step 5: Monitor File System Health

Cline reads source files, writes edits, and creates new files as part of every coding task. A full disk or a permissions error on the project directory will cause confusing mid-task failures. Detect these before Cline encounters them.

  1. Click Add MonitorCron Heartbeat.
  2. Set Expected ping interval to 15 minutes.
  3. Copy the heartbeat URL.

Create check_fs.sh:

#!/bin/bash
PROJECT_DIR="${CLINE_PROJECT_DIR:-$HOME/projects}"

# Verify write access to the project directory
TESTFILE="$PROJECT_DIR/.vigilmon_check"
echo "ok" > "$TESTFILE" && rm "$TESTFILE" || exit 1

# Alert if disk falls below 1 GB free
AVAIL_MB=$(df -m "$PROJECT_DIR" | awk 'NR==2{print $4}')
[ "$AVAIL_MB" -gt 1024 ] || exit 1

curl -s "https://vigilmon.online/heartbeat/YOUR_FS_HEARTBEAT_ID"

Schedule every 15 minutes:

*/15 * * * * /path/to/check_fs.sh

Step 6: Monitor Browser Automation Health

Cline can use Playwright or Puppeteer for web research and browser-based tasks. The browser process must be available and the underlying Chromium binary intact. A failed npm install, a missing system library, or an OOM-killed browser process will cause all web-related agent steps to silently error.

  1. Click Add MonitorCron Heartbeat.
  2. Set Expected ping interval to 30 minutes.
  3. Copy the heartbeat URL.

Create check_browser.sh:

#!/bin/bash
# Verify Playwright can launch Chromium
node -e "
const { chromium } = require('playwright');
(async () => {
  const browser = await chromium.launch({ headless: true });
  await browser.close();
  process.exit(0);
})().catch(() => process.exit(1));
" && curl -s "https://vigilmon.online/heartbeat/YOUR_BROWSER_HEARTBEAT_ID"

Schedule every 30 minutes. If Playwright fails to launch, the heartbeat stops and you can investigate before Cline's next browser task fails mid-execution.


Step 7: SSL Certificate Monitoring

If the Cline API or Ollama is exposed through a reverse proxy with TLS (nginx, Caddy, Traefik), monitor the certificate expiry alongside the HTTP endpoint.

  1. Open the HTTP monitor for Cline's API (created in Step 2).
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

A 21-day window gives you time to investigate Let's Encrypt renewal failures or manually rotate certificates before Cline's integrations start failing with TLS errors.


Step 8: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, Discord, or a webhook.
  2. On the Ollama / LM Studio backend monitor: set Consecutive failures before alert to 1 — inference servers crash hard, not gradually.
  3. On the Cline API monitor: set Consecutive failures to 2 — VS Code extension restarts can briefly interrupt the API.
  4. On heartbeat monitors: the default single-missed-interval threshold is appropriate.

Example: Slack Alert

  1. Create a Slack incoming webhook in your workspace.
  2. In Vigilmon → Alert ChannelsAddSlack.
  3. Paste the webhook URL and assign it to all monitors in this tutorial.

Summary

| Monitor | Type | Target | Interval | |---------|------|--------|----------| | Ollama backend | HTTP | http://localhost:11434/ | 1 min | | LM Studio backend | HTTP | http://localhost:1234/v1/models | 2 min | | Cline extension API | HTTP | http://localhost:3000/ | 1 min | | Model load status | Heartbeat | probe script → Vigilmon | 10 min | | Task queue / stalled task | Heartbeat | probe script → Vigilmon | 15 min | | File system access | Heartbeat | probe script → Vigilmon | 15 min | | Browser automation | Heartbeat | probe script → Vigilmon | 30 min | | SSL certificate | SSL (on HTTP monitor) | reverse proxy domain | — |

Cline's power — executing arbitrary terminal commands, editing files, and browsing the web as part of a fully autonomous agent loop — makes its infrastructure availability critical. A crashed Ollama instance or a stalled task is invisible until a developer notices that nothing happened. With Vigilmon watching every layer, you know within minutes rather than hours.

Get started for free at vigilmon.online.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →