Skip to content

fix(host): refuse a second host on the same home, and close terminals for CLI archive, kill and delete - #586

Merged
iamnbutler merged 3 commits into
mainfrom
fix-host-safety
Oct 22, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
fix-host-safety

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor
  • ace serve now records its port in $ACE_HOME/host.port, and refuses to start while another host still answers on that port with the same home. The refusal names that host, its PID and its command. A stale file, or a port now held by a different home, doesn't block.
  • With this home's host running, ace archive, unarchive, delete and kill go through its gateway, like the app, so the channel's terminals close. Without a running host they act on the catalog directly, as before.

Map: ^891, ^776 (ace-map).

Smoke-tested from this lane on loopback hosts with their own home:

  • A host on 4443, then ace serve --port 4444 on the same home: refused with "… is already served by a command-line Ace host (PID …) on port 4443".
  • With sleep running in a terminal in each of three channels, ace archive, ace kill and ace delete each ended their own channel's shell. ace unarchive worked too.
  • With the host stopped, ace archive still archived. Restarts on 4443 and then 4444 over the stale host.port both started.

Built in Ace

No: Claude Code (the ace2-90 fix-train session) wrote and smoke-tested this through headless hosts, Playwright and the CLI. See #5.

@iamnbutler
iamnbutler merged commit 98c07d1 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-host-safety branch October 22, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant