You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add daemon mode, URL routing, and bounded dedup to debug server
Self-daemonizing --daemon flag eliminates backgrounding issues across
agents. URL route validation at /ingest/:sessionId enables multi-session
support and 404s for malformed paths. Bounded dedup set caps at 10k
entries. SKILL.md updated to use --daemon and DELETE endpoint.
Copy file name to clipboardExpand all lines: packages/debug-agent/skill/SKILL.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,17 +42,13 @@ They guess based on code alone. You **cannot** and **must NOT** fix bugs this wa
42
42
43
43
### STEP 0: Start the logging server (MANDATORY BEFORE ANY INSTRUMENTATION)
44
44
45
-
**CRITICAL: The server is a long-running process. You MUST run it in the BACKGROUND.**
46
-
47
-
Run the debug server as a **background process** before any instrumentation. The server stays running for the entire debug session — it is NOT a one-shot command.
45
+
Run the debug server in **daemon mode** before any instrumentation. The `--daemon` flag starts the server in the background and exits immediately with the server info — no backgrounding or `&` required.
48
46
49
47
```bash
50
-
npx debug-agent 2>&1&
48
+
npx debug-agent --daemon
51
49
```
52
50
53
-
**YOU MUST BACKGROUND THIS COMMAND.** Do NOT run it in the foreground. Do NOT wait for it to complete — it never completes, it is a persistent server. Use `&` (shell background), `nohup`, or your agent's background/async command execution. If your agent platform supports `block_until_ms: 0` or equivalent, use that. If it supports running commands in a separate terminal, do that. **The command MUST NOT block your workflow.**
54
-
55
-
The server prints a single JSON line to stdout on startup:
51
+
The command prints a single JSON line to stdout and exits:
### STEP 3: Clear previous log file before each run (MANDATORY)
131
127
132
-
- Use the delete_file tool to delete the file at the **log path** before asking the user to run.
133
-
- If delete_file unavailable or fails: instruct user to manually delete the log file.
128
+
- Send a `DELETE` request to the **server endpoint** to clear the log file before each run. For example: `curl -X DELETE ENDPOINT` (replace `ENDPOINT` with the endpoint value from Step 0).
134
129
- This ensures clean logs for the new run without mixing old and new data.
135
-
- Do NOT use shell commands (rm, touch, etc.); use the delete_file tool only.
136
130
- Clearing the log file is NOT the same as removing instrumentation; do not remove any debug logs from code here.
137
-
-**CRITICAL:** Only delete YOUR log file (the one at the log path from Step 0). NEVER delete, modify, or overwrite log files belonging to other debug sessions. Other sessions may have log files in the same directory with different session IDs in their filenames — leave them untouched.
131
+
-**CRITICAL:** Only clear YOUR session's logs (via your endpoint from Step 0). NEVER delete, modify, or overwrite log files belonging to other debug sessions.
0 commit comments