Skip to content

docs/capture: --keep stops the demo manager instead of leaving it running #300

Open

Description

@oddessentials

node docs/capture/capture.mjs --keep prints "the demo manager keeps running: …", but the manager has already stopped. Its address refuses connections, and the capture process stays alive with nothing to serve.

Cause

Cleanups run last-first, in the order they were registered:

# Cleanup Registered at
0 remove the data folder tempDir('agent-guild-capture-'), capture.mjs:148
1 close the demo GitHub capture.mjs:151
2 shut down the manager capture.mjs:162
3 remove the Chrome profile capture.mjs:229
4 stop Chrome capture.mjs:244
5 close the DevTools socket capture.mjs:269

With --keep, capture.mjs:464 keeps cleanups.splice(0, 2), which is only #0 and #1, and runs the rest. That includes #2, which shuts the manager down. The comment there says "the manager and its data folder, the first two cleanups", but the manager is the third.

Fix

Keep the first three (cleanups.splice(0, 3)), and correct the comment. Ctrl+C then runs them last-first: it shuts down the manager, closes the demo GitHub, and removes the data folder.

Found

Found while capturing a demo-session screenshot of the VS Code view for oddessentials/agent-guild-vscode#8.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions