Skip to content

Leaving a chat stops it - #58

Merged
0xadvait merged 1 commit into
mainfrom
stop-when-you-leave
Nov 26, 2026
Merged

0xadvait merged 1 commit into
mainfrom
stop-when-you-leave

Conversation

@0xadvait

Copy link
Copy Markdown
Collaborator

The new engine kept working, and billing, after you left a chat mid-task. ghost -z even said so on Ctrl-C: "Detached; accepted work continues at the gateway."

Now, when the last viewer leaves a chat you started (a window or ghost -z), the gateway withdraws what it queued and stops the turn. Telegram, cron and kanban turns are left alone, and the chat stays.

Against the stand-in DreamFort, with a turn running a 20-second command:

You Before After
kill ghost -z 2 requests, ran to the end 1, stopped
Ctrl-C ghost -z 2, ran to the end 1, stopped, says "Stopped."
close the window 2, ran to the end 1, stopped
Ctrl+D 2, ran to the end 1, stopped

A message queued behind it is cancelled too. tests/e2e.py now kills one mid-task on all three systems.

The new engine kept a turn running, and paid for, after you killed `ghost -z`,
pressed Ctrl-C or closed the window. Now the last viewer leaving a chat you
started withdraws what it queued and stops the turn. Bots, cron and kanban
are left alone, and the chat stays.
@0xadvait
0xadvait merged commit 079946d into main Nov 26, 2026
5 checks passed
@0xadvait
0xadvait deleted the stop-when-you-leave branch November 26, 2026 01:46
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