claude-overnight 1.16.15 → 1.16.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Playwright Parallel Usage
|
|
2
|
+
|
|
3
|
+
When running claude-overnight with parallel agents that use the Playwright MCP server, avoid lock conflicts and session cross-contamination.
|
|
4
|
+
|
|
5
|
+
## Isolation Levels
|
|
6
|
+
|
|
7
|
+
| Goal | Approach |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Non-disruptive, no focus steal | Headless mode (default) |
|
|
10
|
+
| Several agents in parallel, no shared cookies | Headless + each MCP server: `--isolated` (or `isolated: true`) |
|
|
11
|
+
| Several agents, each with saved login | Headless + each MCP server: unique `userDataDir` or its own `--storage-state` file |
|
|
12
|
+
| Anti-bot interception (CAPTCHA, Cloudflare) | Fall back to headed mode only when necessary |
|
|
13
|
+
|
|
14
|
+
**Headless preferred by default.** Every headed browser launch becomes the foreground app on macOS, which is disruptive during long runs. Only fall back to headed when anti-bot detection (CAPTCHA, Cloudflare challenge, etc.) requires visible browser interaction.
|
|
15
|
+
|
|
16
|
+
## MCP Server Configuration
|
|
17
|
+
|
|
18
|
+
Add to your `settings.json` or `.claude/settings.local.json`:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"playwright-1": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["@anthropic-ai/mcp-playwright@latest", "--isolated", "--headless"],
|
|
26
|
+
"env": {}
|
|
27
|
+
},
|
|
28
|
+
"playwright-2": {
|
|
29
|
+
"command": "npx",
|
|
30
|
+
"args": ["@anthropic-ai/mcp-playwright@latest", "--isolated", "--headless"],
|
|
31
|
+
"env": {}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
For saved logins, give each server its own `userDataDir`:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"mcpServers": {
|
|
42
|
+
"playwright-agent-a": {
|
|
43
|
+
"command": "npx",
|
|
44
|
+
"args": ["@anthropic-ai/mcp-playwright@latest", "--headless", "--userDataDir", "/tmp/pw-agent-a"],
|
|
45
|
+
"env": {}
|
|
46
|
+
},
|
|
47
|
+
"playwright-agent-b": {
|
|
48
|
+
"command": "npx",
|
|
49
|
+
"args": ["@anthropic-ai/mcp-playwright@latest", "--headless", "--userDataDir", "/tmp/pw-agent-b"],
|
|
50
|
+
"env": {}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Context7 Documentation
|
|
57
|
+
|
|
58
|
+
For the latest Playwright API docs and patterns:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx ctx7@latest library playwright "parallel browser instances isolation"
|
|
62
|
+
npx ctx7@latest docs <libraryId> "parallel browser instances"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Note:** ctx7 requires authentication (`npx ctx7@latest login` or `CONTEXT7_API_KEY` env var). If unauthenticated, lookups will fail — agents should fall back to training data.
|
package/README.md
CHANGED
|
@@ -280,6 +280,36 @@ Saved providers live user-level at `~/.claude/claude-overnight/providers.json` (
|
|
|
280
280
|
|
|
281
281
|
**Non-interactive / CI.** `claude-overnight --model=qwen3.6-plus` auto-resolves the model id to a saved provider — no separate `--provider` flag.
|
|
282
282
|
|
|
283
|
+
## Parallel Playwright Testing
|
|
284
|
+
|
|
285
|
+
When agents use the Playwright MCP server for testing, parallel instances conflict on browser locks and cookie state. Add multiple MCP entries to `settings.json`:
|
|
286
|
+
|
|
287
|
+
```json
|
|
288
|
+
{
|
|
289
|
+
"mcpServers": {
|
|
290
|
+
"playwright-1": {
|
|
291
|
+
"command": "npx",
|
|
292
|
+
"args": ["@anthropic-ai/mcp-playwright@latest", "--isolated", "--headless"]
|
|
293
|
+
},
|
|
294
|
+
"playwright-2": {
|
|
295
|
+
"command": "npx",
|
|
296
|
+
"args": ["@anthropic-ai/mcp-playwright@latest", "--isolated", "--headless"]
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Isolation levels:**
|
|
303
|
+
|
|
304
|
+
| Goal | Approach |
|
|
305
|
+
|---|---|
|
|
306
|
+
| Non-disruptive, no focus steal | Headless mode (default) |
|
|
307
|
+
| Parallel agents, no shared cookies | Headless + `--isolated` per MCP server |
|
|
308
|
+
| Parallel agents, each with saved login | Headless + unique `userDataDir` or `--storage-state` per server |
|
|
309
|
+
| Anti-bot interception (CAPTCHA, Cloudflare) | Drop `--headless` only when necessary |
|
|
310
|
+
|
|
311
|
+
See `QUICKSHEET_PLAYWRIGHT.md` for full config examples.
|
|
312
|
+
|
|
283
313
|
## Spend caps and usage controls
|
|
284
314
|
|
|
285
315
|
### Extra usage protection
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-overnight",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.16",
|
|
4
4
|
"description": "Background lane for your Claude Max plan. Parallel Claude Agent SDK sessions in git worktrees with a usage cap that reserves headroom for your interactive Claude Code. Crash-safe resume. Opus/Sonnet/Haiku + Qwen/OpenRouter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -68,6 +68,8 @@
|
|
|
68
68
|
"files": [
|
|
69
69
|
"dist",
|
|
70
70
|
"!dist/__tests__",
|
|
71
|
+
"plugins",
|
|
72
|
+
"QUICKSHEET_PLAYWRIGHT.md",
|
|
71
73
|
"README.md",
|
|
72
74
|
"LICENSE"
|
|
73
75
|
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-overnight",
|
|
3
|
+
"version": "1.16.16",
|
|
4
|
+
"description": "Claude Code skill for understanding, installing, and inspecting claude-overnight runs — parallel Claude agents in git worktrees with thinking waves, multi-wave steering, and crash-safe resume.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Francesco Fornace"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/Fornace/claude-overnight",
|
|
9
|
+
"license": "MIT"
|
|
10
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-overnight
|
|
3
|
+
description: >
|
|
4
|
+
Understand, install, and inspect claude-overnight runs — a CLI that
|
|
5
|
+
launches parallel Claude agents in git worktrees with thinking waves,
|
|
6
|
+
multi-wave steering, and crash-safe resume. Use when the user mentions
|
|
7
|
+
claude-overnight, a `.claude-overnight/` folder, an "overnight" or
|
|
8
|
+
"swarm" run, or asks to check status / resume / continue a
|
|
9
|
+
multi-phase plan. Not for Vercel Workflow DevKit.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# What it is
|
|
13
|
+
|
|
14
|
+
`claude-overnight` is a CLI (npm: `claude-overnight`, bin: `claude-overnight`) that takes an objective + budget and launches many Claude agent sessions in parallel, each in an isolated git worktree. It's a local multi-session orchestrator built on top of the Claude Agent SDK — not itself an agent harness, but a layer that plans, dispatches, and steers many sessions that run on the SDK's harness. A "thinking wave" of architect sessions explores the codebase, an orchestrator synthesizes concrete tasks, executor waves run them in parallel, and steering decides between more execution, reflection, or declaring done. Rate limits, crashes, and usage caps are all resumable — nothing is lost.
|
|
15
|
+
|
|
16
|
+
Repo: https://github.com/Fornace/claude-overnight
|
|
17
|
+
|
|
18
|
+
# Install / run
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g claude-overnight # Node >= 20; needs Claude auth or ANTHROPIC_API_KEY (or Qwen 3.6 Plus — see repo README)
|
|
22
|
+
claude-overnight # interactive in cwd
|
|
23
|
+
claude-overnight tasks.json # task file mode
|
|
24
|
+
claude-overnight "task a" "task b" # inline
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Common flags: `--budget=N`, `--concurrency=N`, `--model=<name>`, `--usage-cap=N`, `--allow-extra-usage`, `--extra-usage-budget=N`, `--timeout=SECONDS`, `--no-flex`, `--dry-run`.
|
|
28
|
+
|
|
29
|
+
Live keys while running: `b` change budget · `t` change usage cap · `q` graceful stop (twice = force).
|
|
30
|
+
|
|
31
|
+
Exit codes: `0` all ok · `1` some failed · `2` all/none.
|
|
32
|
+
|
|
33
|
+
# On-disk layout (this is how you inspect status)
|
|
34
|
+
|
|
35
|
+
Every run lives at `<repo>/.claude-overnight/runs/<ISO-timestamp>/`:
|
|
36
|
+
|
|
37
|
+
| File / dir | What it tells you |
|
|
38
|
+
|----------------------|-----------------------------------------------------------------------------------|
|
|
39
|
+
| `run.json` | Machine state: objective, model, budget, cost, waves done, branches, done flag. |
|
|
40
|
+
| `status.md` | **Living project snapshot**, rewritten by steering every wave. First line = short status. |
|
|
41
|
+
| `goal.md` | Evolving "north star" — what the run currently thinks "amazing" means. |
|
|
42
|
+
| `milestones/*.md` | Strategic snapshots archived ~every 5 waves. Long-term memory of the run. |
|
|
43
|
+
| `designs/*.md` | Architect outputs from the thinking wave. Deleted once the objective is complete. |
|
|
44
|
+
| `sessions/wave-N.json` | Per-wave agent records: prompt, status, cost, files changed, branch, error. |
|
|
45
|
+
|
|
46
|
+
The newest subfolder under `runs/` is the current/last run. A run that never reached "done" is **resumable** — `run.json` will not be marked complete and `designs/` may still be present.
|
|
47
|
+
|
|
48
|
+
To assess status of a run from scratch, read in this order: `goal.md` → `status.md` → newest file in `milestones/` → newest `sessions/wave-*.json` → `run.json`. Five reads and you know exactly where it stands.
|
|
49
|
+
|
|
50
|
+
**Durable run history (committed, survives cleanup):** `claude-overnight.log.md` at the repo root is updated on every run with a block per run ID — original objective, start/finish times, cost, outcome, branch. If the user asks "what was my prompt" or "what did last night's run do" and `.claude-overnight/runs/` is empty, this file is the canonical recovery path.
|
|
51
|
+
|
|
52
|
+
# Resume / continue
|
|
53
|
+
|
|
54
|
+
Just run `claude-overnight` again in the same repo. It auto-detects the unfinished run and shows a **Resume / Fresh / Quit** prompt. On resume: unmerged `swarm/task-*` branches auto-merge, the wave loop continues, status/goal/milestones/designs are preserved. If orchestration crashed after the thinking wave, surviving `designs/*.md` are reused — no re-paying for architects.
|
|
55
|
+
|
|
56
|
+
For **multi-phase plans** (task file with `objective` + `flexiblePlan: true`), resuming picks up at the next wave with full steering context. Don't hand-edit `run.json` to "fix" a stuck run unless something is demonstrably corrupt — prefer re-running and letting steering re-assess.
|
|
57
|
+
|
|
58
|
+
Merged branches from prior runs are not re-run. Knowledge carries forward across runs: new runs see what completed runs built.
|
|
59
|
+
|
|
60
|
+
# Diagnosing a stuck / failed run
|
|
61
|
+
|
|
62
|
+
1. Read `status.md` (living snapshot) and the newest `sessions/wave-*.json`.
|
|
63
|
+
2. Check for `swarm/task-*` branches left behind (`git branch --list 'swarm/*'`) — these are unmerged worktree outputs, usually from a conflict or crash.
|
|
64
|
+
3. Look at `run.json` for `done`, `lastError`, usage/cost fields.
|
|
65
|
+
4. If the thinking wave succeeded but orchestration crashed, `designs/` will still contain the architect docs — a resume will reuse them.
|
|
66
|
+
5. If rate-limited, the tool waits and retries on its own — do not kill it unless the user asks.
|
|
67
|
+
|
|
68
|
+
# What NOT to do
|
|
69
|
+
|
|
70
|
+
- Don't micromanage the tool. It has its own planner, steering, and goal refinement — trust them.
|
|
71
|
+
- Don't invent a resume procedure. The CLI handles resume itself; the correct action is almost always "re-run `claude-overnight` in the repo".
|
|
72
|
+
- Don't delete `.claude-overnight/` to "clean up" — it holds the only record of what the run learned. It should be in `.gitignore`.
|
|
73
|
+
- Don't truncate or summarize agent output files when reading them back — never discard expensive agent output.
|
|
74
|
+
- Don't confuse this with Vercel Workflow DevKit — unrelated despite the word "workflow".
|
|
75
|
+
|
|
76
|
+
# Playwright Parallel Usage
|
|
77
|
+
|
|
78
|
+
When agents use the Playwright MCP server for testing, parallel instances conflict on browser locks and cookie state. See `QUICKSHEET_PLAYWRIGHT.md` at the repo root for the full reference.
|
|
79
|
+
|
|
80
|
+
**Quick rules:**
|
|
81
|
+
- **Headless by default** — prevents focus stealing on macOS. Only use headed when anti-bot detection (CAPTCHA, Cloudflare) forces it
|
|
82
|
+
- **Isolated agents (no login):** Each MCP server needs `--isolated --headless`
|
|
83
|
+
- **Isolated agents (with saved login):** Each needs its own `userDataDir` or `--storage-state` file, plus `--headless`
|
|
84
|
+
- Multiple MCP entries in `settings.json` — one per concurrency slot, or use a single `--isolated` entry if cookies don't need to persist
|
|
85
|
+
|
|
86
|
+
**Context7 (ctx7) docs:** Requires authentication (`npx ctx7@latest login` or `CONTEXT7_API_KEY`). Pre-flight check:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npx ctx7@latest library playwright "parallel browser instances"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
If this fails with a quota/auth error, fall back to training data — don't block the run.
|