Commit Graph

10 Commits

Author SHA1 Message Date
mayor
6e2169de7f feat(orphans): add gt orphans kill command
Adds command to find and terminate orphan claude processes with PPID=1.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-21 18:04:00 -08:00
nux
44d5b4fdd2 feat(orphans): add --aggressive flag for tmux-verified orphan detection
The existing PPID=1 detection misses orphaned Claude processes that get
reparented to something other than init/launchd. The new --aggressive
flag cross-references Claude processes against active tmux sessions to
find ALL orphans not in any gt-* or hq-* session.

Testing shows this catches ~3x more orphans (117 vs 39 in one sample).

Usage:
  gt orphans procs --aggressive       # List ALL orphans
  gt orphans procs kill --aggressive  # Kill ALL orphans

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:43:31 -08:00
dag
eea3dd564d feat(orphans): make kill command handle both commits and processes
The gt orphans kill command now performs a unified cleanup that removes
orphaned commits via git gc AND kills orphaned Claude processes in one
operation, with a single confirmation prompt.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 15:44:07 -08:00
gus
ff6c02b15d fix(lint): fix errcheck and misspell in orphans.go
- Check fmt.Scanln return values (errcheck)
- Fix "Cancelled" → "Canceled" spelling (misspell)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 13:32:13 -08:00
gastown/refinery
18893e713a feat(orphans): add list and kill subcommands for Claude process orphans
Merge polecat/rictus-mkd0azo9: Adds `gt orphans procs` command group
for managing orphaned Claude processes (PPID=1).

- `gt orphans procs` / `gt orphans procs list` - list orphan processes
- `gt orphans procs kill [-f]` - kill orphan processes with confirmation

Resolves conflict with existing `gt orphans kill` (for git commits) by
placing process orphan commands under `procs` subcommand.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 12:07:00 -08:00
rictus
ea12679a5a feat(orphans): add list and kill subcommands for Claude process orphans
Add commands to find and terminate orphan Claude processes (those with
PPID=1 that survived session termination):

- gt orphans list: Show orphan Claude processes
- gt orphans kill: Kill with confirmation
- gt orphans kill -f: Force kill without confirmation

Detection excludes:
- tmux processes (may contain "claude" in args)
- Claude.app desktop application processes
- Claude Helper processes

The original `gt orphans` functionality for finding orphan git commits
is preserved.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 12:02:38 -08:00
rictus
a43c89c01b feat(orphans): add kill command to remove orphaned commits
Adds `gt orphans kill` subcommand that permanently removes orphaned
commits by running `git gc --prune=now`.

Flags:
- --dry-run: Preview without deleting
- --days N: Kill orphans from last N days (default 7)
- --all: Kill all orphans regardless of age
- --force: Skip confirmation prompt

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:54:52 -08:00
Steve Yegge
212d818305 fix: Capture stderr instead of suppressing in command execution
Several files were setting cmd.Stderr = nil, which hides potentially
critical error messages:

- prime.go: bd prime, gt mail check, and bd show commands now log
  stderr on failure for debugging
- orphans.go: git fsck now includes stderr in error messages
- patrol_helpers.go: bd list/show/catalog commands now log stderr

Daemon launch cases (up.go, daemon.go, daemon_check.go) correctly
use nil for I/O detachment but now have clarifying comments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:52:02 -08:00
Steve Yegge
f86a73c2f0 feat: Add gcloud-style command grouping to gt help output
Organize 43 commands into 7 logical groups using cobra's built-in
AddGroup/GroupID feature:

- Work Management: spawn, sling, hook, handoff, done, mol, mq, etc.
- Agent Management: mayor, witness, refinery, deacon, polecat, etc.
- Communication: mail, nudge, broadcast, peek
- Services: daemon, start, stop, up, down, shutdown
- Workspace: rig, crew, init, install, git-init, namepool
- Configuration: account, theme, hooks, issue, completion
- Diagnostics: status, doctor, prime, version, help

Also renamed molecule to mol as the primary command name
(molecule is now an alias).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 02:32:01 -08:00
Steve Yegge
07a40771da feat: add gt orphans command to find lost polecat work
Implements gt-b2hj: Uses git fsck --unreachable to find orphaned commits
that were never merged to main.

Features:
- Filters to commits only (not blobs/trees)
- Date filtering (--days=N, default 7)
- Excludes stash commits (WIP on, index on, etc.)
- Excludes routine bd sync commits
- Shows recovery hints (cherry-pick, show, branch)
2025-12-21 11:11:03 -08:00