diff --git a/.env.example b/.env.example index fef2ec8..5c50f2f 100644 --- a/.env.example +++ b/.env.example @@ -50,6 +50,14 @@ CLAUDE_IDLE_TIMEOUT_MS=1800000 # so a task keeps running to the end even with no browser connected. # TASK_DISCONNECT_TIMEOUT_MS=1800000 +# Reap an idle subscription-engine pane, and every MCP server it spawned. +# Unset or 0 (default) keeps the old behaviour: `ccs-` lives as long as the +# studio process. Set it to a window (e.g. 900000 = 15 min) and a chat with no +# running turn and no attached viewer for that long has its tmux session killed; +# the next message respawns it with `--resume`, so no history is lost. Measured +# ~1.2 GB per open session (claude ~300 MB + MCP servers ~900 MB). +# CCS_ENGINE_IDLE_KILL_MS=0 + # Ceiling on turns per sub-agent in multi-agent mode (default 200, matching the # UI's "Turns" field). A sub-agent that exhausts its turns auto-continues up to # 3 times, so worst case per agent is 4x this number. Lower it to cap spend. diff --git a/CLAUDE.md b/CLAUDE.md index 4a5019d..06c7755 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,7 +31,7 @@ npm run release # bump, commit, tag, push → GitHub npm run release:mac # on the Mac with the cert: build, notarize, verify, upload, bump the cask ``` -No linting and no build step configured. `npm test` chains 108 test files under `test/`: 20 DOM-less render/UI-logic tests (`test/render/*.test.mjs`, run through `node --test`) plus 88 plain-`node` suites in `test/` covering the focused workspace and its Back/Forward history (`focused-workspace.test.js`, `secondary-navigation.test.js` — see "Focused workspace navigation" below), the form workflows of every section (`settings-ux`, `team-forms-ux`, `section-controls-ux`, `page-forms-ux` — see docs/SECTION-CONTROLS-REVIEW.md), the sidebar rows and chat delete (`sidebar-ux.test.js` runs the real `delSess`/`delSelectedHist` in a `vm`: a 409 `UNMERGED_WORK` is asked about and resent with force, never swallowed — both doors used to close the tab and reload, so the chat came straight back; and it pins that hover-only row actions take no width on a mouse), the overload detector, env load order, multi-agent results, terminals, bots, telegram, updates, kanban scheduling, the Kanban card's run-settings badges (`kanban-run-badges.test.js` pins the card's model/effort/engine chain against the one `startTask` actually resolves — the two live in different files and the card silently lies when they drift), the board-only `create_task` status (`task-backlog.test.js`), session expiry (`session-expiry.test.js` boots a real server TWICE against one `APP_DIR`, ages sessions in SQLite between the boots, and pins that expiry removes the worktree, branch and queued messages of a clean session while keeping one with uncommitted work, its Kanban cards, and an orphan tree younger than an hour), the external agents' model/effort catalogs (`agent-catalog.test.js` — #123: the Settings form and `POST /api/external-agents` both carry them, and the browser's comma parser is RUN against the server sanitiser so the two cannot drift), the Kanban group form (`kanban-group-button.test.js` RUNS the real `buildChainForm` in a `vm` context so a stray free variable in its template throws there instead of silently killing the modal — see #115 — and parses every inline `