feat: opt-in polecat self-terminate after gt done (with cleanup fix)#3302
Merged
steveyegge merged 2 commits intogastownhall:mainfrom Mar 27, 2026
Merged
Conversation
Add `polecat_self_terminate` config option (default: false) under operational.daemon. When enabled, polecats kill their session 3s after gt done instead of transitioning to IDLE. Config: settings/config.json → operational.daemon.polecat_self_terminate: true This is opt-in to preserve the existing persistent polecat model while allowing operators who run at scale (10-30 concurrent polecats) to use disposable polecats with fresh context windows per task. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The self-terminate goroutine was firing inside the idle-transition block, 3 seconds before gt done finished. This killed the tmux session before the worktree nuke and other cleanup could complete, leaving 25 orphaned worktree directories on disk. Move self-terminate to be the LAST action in gt done, after all cleanup (branch push, MR submit, worktree sync, branch delete) has completed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
❌ 5 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I KNOW YOU ALREADY CHAGNED THIS BUT HEAR ME OUT
i saw
https://discord.com/channels/1462817445562814505/1462953549838291045/1475601173812740129
we have been discussing in troubleshooting, starting around here https://discord.com/channels/1462817445562814505/1462951684551737509/1486363653489037552
this is the latest summary of the issues and why i am wanting these changes:
polecat-session-deaths (1).md
its entirely possible im just using gastown wrong, i probably am, but i cannot figure out how to make all of these polecat deaths reliably cease without making them ephemeral. this is half pr half cry for help
Summary
polecat_self_terminateconfig option (default: false) underoperational.daemongt donecompletes instead of transitioning to IDLESupersedes #3295 (same feature, adds the cleanup timing fix).
Test plan
go build ./...passesGenerated with Claude Code