| name | dev-server |
| description | Use when the user says "start the dev server", "restart the server", "check the server logs", "what's the server error", or any dev-server lifecycle phrasing. |
| user-invocable | true |
| tier | util |
Run: `bash "$(git rev-parse --show-toplevel)/bin/harness-update-check"`
- `UPGRADE_AVAILABLE ` → tell the user: "agent-harness is available (you have ). Run `/harness-update` to pull it in." Then continue.
- `JUST_UPGRADED ` → tell the user: "agent-harness upgraded → ." Then continue.
- No output → continue silently.
Dev Server
Start, stop, and monitor the local development server. Use when the user says "start the dev server", "restart the server", "check the server logs", "what's the server error", or similar.
Configuration
Read .claude/hooks/config.sh for:
HARNESS_DEV_CMD — command to start the dev server (e.g., pnpm dev)
HARNESS_DEV_PORT — fallback port when not in a Conductor workspace (default: 3000)
HARNESS_DEV_PROCESS — process name pattern for pkill
HARNESS_APP_NAME — used for log file naming
Port resolution: When determining which port the dev server is actually bound to, prefer ${CONDUCTOR_PORT:-$HARNESS_DEV_PORT}. Inside a Conductor workspace, conductor.json's run script starts the server on $CONDUCTOR_PORT. Outside Conductor, it's $HARNESS_DEV_PORT.
Starting the Server
-
Create the logs directory:
mkdir -p /tmp/${HARNESS_APP_NAME// /-}-logs
-
Kill any existing dev server to avoid port conflicts:
pkill -f "$HARNESS_DEV_PROCESS" 2>/dev/null || true
Wait 2 seconds for ports to release.
-
Start the dev server in the background using the Bash tool with run_in_background: true:
cd $(git rev-parse --show-toplevel) && $HARNESS_DEV_CMD 2>&1 | tee /tmp/${HARNESS_APP_NAME// /-}-logs/dev.log
-
Tell the user:
- The server is running in the background
- They can watch logs with:
tail -f /tmp/<app-name>-logs/dev.log
- You can check logs anytime via TaskOutput
Checking Logs
When asked about server errors or logs, use TaskOutput to read the background task output. Also check:
tail -100 /tmp/<app-name>-logs/dev.log
Restarting the Server
- Stop the current background task (TaskStop)
- Follow the "Starting the Server" steps above
Stopping the Server
- Stop the background task (TaskStop)
- Clean up:
pkill -f "$HARNESS_DEV_PROCESS" 2>/dev/null || true