Commit Graph

65 Commits

Author SHA1 Message Date
jack
afff85cdff fix(tmux): use NewSessionWithCommand to avoid send-keys race condition
Agent sessions would fail on startup because send-keys arrived before the
shell was ready, causing 'bad pattern' and 'command not found' errors.

Fix: Create sessions with the command directly using tmux new-session's
command argument. This runs the agent as the pane's initial process,
avoiding shell readiness timing issues entirely.

Updated all agent managers: mayor, deacon, witness, refinery, polecat, crew.

Also fixes pre-existing build error in polecat/manager.go (polecatPath →
clonePath/newClonePath).

Closes #280

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 23:35:31 -08:00
jack
43272f6fbb feat(tmux): enable mouse mode by default for Gas Town sessions
Adds EnableMouseMode() and calls it from ConfigureGasTownSession so all
new GT sessions get mouse support. Users can now click panes, scroll with
mouse wheel, and resize by dragging. Hold Shift for terminal text selection.

Closes #33

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 23:01:47 -08:00
george
65c3e90374 feat: Add Codex and OpenCode runtime backend support (#281)
Adds support for alternative AI runtime backends (Codex, OpenCode) alongside
the default Claude backend through a runtime abstraction layer.

- internal/runtime/runtime.go - Runtime-agnostic helper functions
- Extended RuntimeConfig with provider-specific settings
- internal/opencode/ for OpenCode plugin support
- Updated session managers to use runtime abstraction
- Removed unused ensureXxxSession functions
- Fixed daemon.go indentation, updated terminology to runtime

Backward compatible: Claude remains default runtime.

Co-Authored-By: Ben Kraus <ben@cinematicsoftware.com>
Co-Authored-By: Cameron Palmer <cameronmpalmer@users.noreply.github.com>
2026-01-08 22:56:37 -08:00
Ben Kraus
38adfa4d8b codex 2026-01-08 12:36:54 -05:00
julianknutsen
caa88d96c5 fix: IsClaudeRunning detects 'claude' and version patterns
Claude Code can report its pane command as "node", "claude", or a version
number like "2.0.76". Previously only "node" was detected, causing healthy
sessions to be incorrectly identified as zombies and killed during daemon
heartbeat recovery.

This fix detects all three patterns to prevent witness sessions from being
killed every 3 minutes.

Based on michaellady's work in PR #174.

Co-Authored-By: michaellady <michaellady@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:25:15 -08:00
Mike Lady
92042d679c feat: Add Cursor, Auggie, and Sourcegraph AMP agent presets (#247)
* feat: add Cursor Agent as compatible agent for Gas Town

Add AgentCursor preset with ProcessNames field for multi-agent detection:
- AgentCursor preset: cursor-agent -p -f (headless + force mode)
- ProcessNames field on AgentPresetInfo for agent detection
- IsAgentRunning(session, processNames) in tmux package
- GetProcessNames(agentName) helper function

Closes: ga-vwr

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: centralize agent preset list in config.go

Replace hardcoded ["claude", "gemini", "codex"] arrays with calls to
config.ListAgentPresets() to dynamically include all registered agents.

This fixes cursor agent not appearing in `gt config agent list` and
ensures new agent presets are automatically included everywhere.

Also updated doc comments to include "cursor" in example lists.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: add comprehensive agent client tests

Add tests for agent detection and command generation:

- TestIsAgentRunning: validates process name detection for all agents
  (claude/node, gemini, codex, cursor-agent)
- TestIsAgentRunning_NonexistentSession: edge case handling
- TestIsClaudeRunning: backwards compatibility wrapper
- TestListAgentPresetsMatchesConstants: ensures ListAgentPresets()
  returns all AgentPreset constants
- TestAgentCommandGeneration: validates full command line generation
  for all supported agents

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: add Auggie agent, fix Cursor interactive mode

Add Auggie CLI as supported agent:
- Command: auggie
- Args: --allow-indexing
- Supports session resume via --resume flag

Fix Cursor agent configuration:
- Remove -p flag (requires prompt, breaks interactive mode)
- Clear SessionIDEnv (cursor uses --resume with chatId directly)
- Keep -f flag for force/YOLO mode

Updated all test cases for both agents.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(agents): add Sourcegraph AMP as agent preset

Add AgentAmp constant and builtinPresets entry for Sourcegraph AMP CLI.

Configuration:
- Command: amp
- Args: --dangerously-allow-all --no-ide
- ResumeStyle: subcommand (amp threads continue <threadId>)
- ProcessNames: amp

Closes: ga-guq

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: lint error in cleanBeadsRuntimeFiles

Change function to not return error (was always nil).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: beads v0.46.0 compatibility and test fixes

- Add custom types config (agent,role,rig,convoy,event) after bd init calls
- Fix tmux_test.go to use variadic IsAgentRunning signature

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: update agent documentation for new presets

- README.md: Update agent examples to show cursor/auggie, add built-in presets list
- docs/reference.md: Add cursor, auggie, amp to built-in agents list
- CHANGELOG.md: Add entry for new agent presets under [Unreleased]

Addresses PR #247 review feedback.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 20:35:06 -08:00
max
d6add3f9b4 feat(tmux): add hq- prefix support to cycle bindings
Makes C-b n/p/a work in hq- sessions (mayor) in addition to gt- sessions.
2026-01-06 23:37:09 -08:00
jv
22693c1dcc feat: runtime-aware tmux agent checks 2026-01-06 19:13:14 -08:00
max
1b69576573 fix: Address golangci-lint errors (errcheck, gosec) (#76)
Apply PR #76 from dannomayernotabot:

- Add golangci exclusions for internal package false positives
- Tighten file permissions (0644 -> 0600) for sensitive files
- Add ReadHeaderTimeout to HTTP server (slowloris prevention)
- Explicit error ignoring with _ = for intentional cases
- Add //nolint comments with justifications
- Spelling: cancelled -> canceled (US locale)

Co-Authored-By: dannomayernotabot <noreply@github.com>

🤖 Generated with Claude Code
2026-01-03 16:11:55 -08:00
Olivier Debeuf De Rijcker
047585866a fix: Add retry logic for Enter key send in NudgeSession/NudgePane (#53)
When sending messages to Claude sessions via tmux, the Enter key send
could fail silently. This caused polecats to receive their initial
prompt but never submit it - the message appeared in Claude's input
area but Enter was never pressed.

Add retry logic (up to 3 attempts with 200ms delays) for the Enter
send step in both NudgeSession() and NudgePane(). This ensures message
submission is more reliable even if tmux has transient issues.

Fixes #41
2026-01-03 11:53:49 -08:00
gus
8bb981c7cf fix(tmux): Use exact matching for HasSession to prevent prefix matches
tmux has-session -t does prefix matching by default, so "gt-deacon-boot"
would match when checking for "gt-deacon". This caused gt start to think
the Deacon was running when only a stale gt-deacon-boot session existed.

Using "=" prefix forces exact matching in tmux.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 11:39:51 -08:00
dag
9ad826cd8c fix(daemon): Kill zombie tmux sessions before recreating
The daemon was failing to restart agents when zombie tmux sessions existed
(session alive but Claude dead). Added EnsureSessionFresh() helper to
tmux package that:
- Checks if session exists
- If exists but Claude not running (zombie), kills the session
- Creates fresh session

Updated all daemon session creation points to use EnsureSessionFresh:
- ensureDeaconRunning()
- ensureWitnessRunning()
- restartPolecatSession()
- restartSession() in lifecycle.go

Added tests for the new helper function. (gt-j1i0r)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:54:39 -08:00
kustrun
94857fc913 fix(session): Auto-accept Claude bypass permissions warning dialog
When Claude starts with --dangerously-skip-permissions, it shows a warning
dialog requiring Down+Enter to accept. This blocked automated polecat and
agent startup.

Added AcceptBypassPermissionsWarning() to tmux package that:
- Checks if the warning dialog is present by capturing pane content
- Only sends Down+Enter if "Bypass Permissions mode" text is found
- Avoids interfering with sessions that don't show the warning

Updated all Claude startup locations:
- session/manager.go (polecat sessions)
- cmd/up.go (mayor, witness, crew, polecat cold starts)
- daemon/daemon.go (crashed polecat restarts)
- daemon/lifecycle.go (role session starts)
2026-01-02 22:44:58 +01:00
gastown/crew/max
0ec1995647 fix: scope tmux keybindings to Gas Town sessions only (#13)
Use conditional bindings (if-shell) to check if session name starts
with "gt-" before running Gas Town commands. For non-GT sessions:
- C-b n/p fall back to default next-window/previous-window
- C-b a shows a help message

This prevents Gas Town from hijacking keybindings in unrelated tmux
sessions that happen to share the same tmux server.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 01:18:43 -08:00
gastown/crew/joe
721b4ec1dd Centralize role emojis: Witness 👁→🦉, Deacon 🦉🐺
Added centralized emoji constants in internal/constants/constants.go
for easy customization. Updated all files that hardcoded role emojis
to use the new constants.

Changes:
- Witness emoji: 👁 (eye) → 🦉 (owl) - less creepy, matches visual identity
- Deacon emoji: 🦉 (owl) → 🐺 (wolf) - matches hierarchy prompt (wolf in engine room)
- Added RoleEmoji() helper function for string-based lookups
- Maintained backwards compatibility with legacy role names

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:10:52 -08:00
Steve Yegge
2112804aba Implement Boot: daemon entry point dog for Deacon triage (gt-rwd5j)
Boot is a watchdog that the daemon pokes instead of Deacon directly,
centralizing the 'when to wake Deacon' decision in an agent that can
reason about context.

Key changes:
- Add internal/boot package with marker file and status tracking
- Add gt boot commands: status, spawn, triage
- Add mol-boot-triage formula for Boot's triage cycle
- Modify daemon to call ensureBootRunning instead of ensureDeaconRunning
- Add tmux.IsAvailable() for degraded mode detection
- Add boot.md.tmpl role template

Boot lifecycle:
1. Daemon tick spawns Boot (fresh each time)
2. Boot runs triage: observe, decide, act
3. Boot cleans stale handoffs from Deacon inbox
4. Boot exits (or handoffs in non-degraded mode)

In degraded mode (no tmux), Boot runs mechanical triage directly.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:20:00 -08:00
Steve Yegge
6da21f6a3e Fix gt crew at to detect existing Claude sessions (gt-l90dq)
Before: gt crew at only looked for tmux sessions with the specific naming
convention gt-<rig>-crew-<name>. If the user started Claude manually or
via a different mechanism, it would create a duplicate session.

After: Before creating a new session, check if any existing tmux session
has Claude running in the crews directory. If found, attach to that
session instead of creating a new one.

Changes:
- Add FindSessionByWorkDir() to internal/tmux/tmux.go to search sessions
  by working directory, optionally filtering for Claude (node) running
- Update runCrewAt() to check for existing sessions before creating new

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 22:01:59 -08:00
Steve Yegge
40cb3eb9fc Extract timing constants to constants package (gt-795e8)
Added 6 timing constants:
- ShutdownNotifyDelay (500ms)
- ClaudeStartTimeout (15s)
- ShellReadyTimeout (5s)
- DefaultDebounceMs (100)
- DefaultDisplayMs (5000)
- PollInterval (100ms)

Updated 7 files to use these constants instead of magic numbers.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:18:03 -08:00
Steve Yegge
4f94ba2b6b Extract SupportedShells constant to constants package (gt-4u682)
- Added constants.SupportedShells for consistent shell list
- Updated 7 usages across start.go, crew_lifecycle.go, crew_helpers.go, tmux.go
- All tests pass

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:39 -08:00
Steve Yegge
b172fd4787 feat: Add rig infra cycling (witness ↔ refinery)
Extended the unified cycle system to include rig infrastructure sessions:
- Witness ↔ Refinery (per rig) now cycle with C-b n/p

Also moved SetCycleBindings into ConfigureGasTownSession so ALL Gas Town
sessions automatically get the unified cycle bindings. Removed redundant
individual calls from crew, mayor, and deacon startup code.

Cycle groups are now:
- Town: Mayor ↔ Deacon
- Crew (per rig): All crew members in same rig
- Infra (per rig): Witness ↔ Refinery

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:36:38 -08:00
Steve Yegge
40977b1ccc feat: Unify C-b n/p cycling across session types
The previous implementation set separate bindings for crew vs town
sessions, but tmux key bindings are global. This meant whichever
session type was started last would overwrite the other's bindings.

New approach:
- Add unified `gt cycle next/prev` command that auto-detects session type
- Town sessions (gt-mayor, gt-deacon) cycle within town group
- Crew sessions (gt-*-crew-*) cycle within their rig's crew
- Other sessions (polecats, witness, refinery) do nothing on cycle

The old SetCrewCycleBindings and SetTownCycleBindings are now aliases
for the unified SetCycleBindings function.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:07:58 -08:00
Steve Yegge
faee888a9f Add town session cycling for mayor/deacon (C-b n/p)
- Create gt town next/prev commands for cycling between town-level sessions
- Add SetTownCycleBindings() to tmux package
- Wire up bindings when starting mayor and deacon sessions

Now mayor and deacon have the same C-b n/p cycling behavior as crew workers.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:00:41 -08:00
Steve Yegge
b2c3b21721 Change feed hotkey from C-b f to C-b a (activity)
C-b f conflicts with tmux built-in find-window command.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:31:30 -08:00
Steve Yegge
a43a5a8e4b Add tmux hotkey C-b f for feed window (gt-95j13)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:27:10 -08:00
Steve Yegge
305345bf36 fix: Check tmux session before declaring lock stale
Previously, gt doctor --fix would kill workers whose spawning process had
exited, even though the Claude session was still running in tmux.

Now both identity_check.go and CleanStaleLocks check if the tmux session
exists before declaring a lock stale. A lock is only truly stale if BOTH
the PID is dead AND the session does not exist.

Also added ListSessionIDs() to tmux package to handle locks that store
session IDs (%N or $N format) instead of session names.
2025-12-26 20:49:06 -08:00
Steve Yegge
2117eb66f5 feat: Add tmux crash detection hooks (gt-i9s7o)
- Add SetPaneDiedHook to tmux package for crash detection
- Add gt log crash subcommand for hook callback
- Set pane-died hook when starting polecat sessions
- Distinguish exit types: 0=done, 130=kill (Ctrl+C), other=crash
- Rename townlog/townlog.go to townlog/logger.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 16:18:44 -08:00
Steve Yegge
36eb38be82 Crew sessions: use respawn-pane for cleaner lifecycle (gt-09i4)
Replace SendKeys approach with respawn-pane -k when starting Claude
in crew sessions. This gives cleaner exit behavior:
- Before: Claude exits → shell prompt → exit shell → session ends
- After: Claude exits → session ends (no intermediate shell)

Changes:
- Add GetPaneID() to tmux package for pane ID retrieval
- Update crew_at.go to use RespawnPane for both new and restart cases
- Remove unnecessary waits and multi-step Claude startup

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 13:20:50 -08:00
Steve Yegge
34b5a3bb8d Document intentional error suppressions with comments (gt-zn9m)
All 156 instances of _ = error suppression in non-test code now have
explanatory comments documenting why the error is intentionally ignored.

Categories of intentional suppressions:
- non-fatal: session works without these - tmux environment setup
- non-fatal: theming failure does not affect operation - visual styling
- best-effort cleanup - defer cleanup on failure paths
- best-effort notification - mail/notifications that should not block
- best-effort interrupt - graceful shutdown attempts
- crypto/rand.Read only fails on broken system - random ID generation
- output errors non-actionable - fmt.Fprint to io.Writer

This addresses the silent failure and debugging concerns raised in the
issue by making the intentionality explicit in the code.

Generated with Claude Code https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 23:14:29 -08:00
Steve Yegge
e3d33770c6 Remove unused LinkWindow function from tmux package 2025-12-25 19:18:24 -08:00
Steve Yegge
4aa58c14da bd sync: 2025-12-25 12:41:08 2025-12-25 12:41:41 -08:00
Steve Yegge
9446cd4806 Add mol-polecat-work, mol-polecat-lease, mol-gastown-boot formulas; fix spawn.go to use catalog ID 2025-12-25 11:47:06 -08:00
Steve Yegge
818a8a41f9 Clear tmux scrollback on handoff
Adds ClearHistory method to tmux package and calls it before
respawn-pane during handoff. This resets copy-mode display
from [0/N] to [0/0] for a clean session start.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 02:07:23 -08:00
Steve Yegge
23600af50c docs: comprehensive hook/sling/handoff/nudge audit
- Update propulsion-principle.md: implementation status now accurate
- Update beads-data-plane.md: correct command syntax
- Fix hook.go: clarify durability semantics, add related commands
- Fix sling.go: use reliable NudgePane instead of raw tmux send-keys
- Add tmux.NudgePane: pane-targeted reliable message delivery

The command menagerie:
  gt hook    = assign (durability)
  gt nudge   = communicate (generic messaging)
  gt sling   = hook + nudge "start working"
  gt handoff = hook + restart (GUPP kicks in)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:17:25 -08:00
Steve Yegge
b930704b5f fix: prevent tmux link-window from auto-switching windows (gt-wmhj)
When running `gt crew at <other>` from inside tmux, the linked window
would auto-select, causing users to unknowingly switch agents. Add -d
flag to keep user in their current window.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 14:34:25 -08:00
Steve Yegge
46ce96ae62 merge: resolve conflict in tmux.go (keep SwitchClient) 2025-12-23 04:48:14 -08:00
Steve Yegge
be5509fb18 gt down --all: also kill tmux server 2025-12-23 02:04:17 -08:00
Steve Yegge
22fe745595 Add gt recycle command for instant session hot-reload
Uses tmux respawn-pane to kill and restart agent sessions in place,
bypassing the handoff/manager flow for quick context cycling.

Supports local recycle (current session) and remote recycle (other
roles) with automatic client switching.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 23:12:31 -08:00
Steve Yegge
e9587bf045 Smart attach: link window when inside tmux
When 'gt X attach' is run from inside a tmux session, link the target
session's window as a new tab instead of switching sessions entirely.
Use C-b n/p to navigate between tabs.

Outside tmux: unchanged behavior (full attach)
Inside tmux: links window as tab for convenient multi-session viewing

- Add tmux.LinkWindow() and tmux.IsInsideTmux()
- Update attachToTmuxSession() with smart detection
- Update mayor, deacon, crew, refinery attach commands
2025-12-22 15:42:37 -08:00
Steve Yegge
47ce32c6c1 Fix crew status line to show full path: rig/crew/name
The status-left for crew members was showing just rig/name (e.g.,
"gastown/max") instead of the full path (e.g., "gastown/crew/max").

This makes crew member identity clearer in the tmux status bar, matching
the mail address format used elsewhere.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 00:27:19 -08:00
Steve Yegge
7542cf7596 Show current work (in_progress issues) in crew/polecat status bar
- Added GetPaneWorkDir to tmux package to get pane current directory
- Added getCurrentWork helper that queries beads for in_progress issues
- Worker status line now shows first in_progress issue (ID: title)
- Falls back to GT_ISSUE env var if set, or empty if no work in progress
- Truncated to 40 chars to fit status bar

Example: 👷 gt-44wh: Polecats must not create GitHu… |

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:26:54 -08:00
Steve Yegge
c1d090bbc6 Compact status bar left side, expand mail preview to 45 chars
Left side simplified:
- Before: 🎩 [Mayor] coordinator (25+ chars)
- After:  🎩 Mayor (10 chars)
- Icon already identifies role, no need for redundancy

Right side expanded:
- status-right-length: 50 → 80
- Mail preview: 20-25 → 45 chars
- Shows more useful context at a glance

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:22:00 -08:00
Steve Yegge
b254b4b3f8 Add clickable mail preview in tmux status bar
- New `gt mail peek` command shows compact preview of first unread message
- Left-click on status-right (mail icon area) opens popup with mail preview
- Popup shows subject, sender, body preview (truncated to 500 chars)
- Shows count of additional unread messages if any
- Silent exit (code 1) when no unread mail

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:14:08 -08:00
Steve Yegge
e871a084bf feat(tmux): add role icons to left side of status bar
Shows icon before brackets: 😺 [gastown/Rictus] polecat

Existing sessions need restart to see the change.
2025-12-21 16:33:37 -08:00
Steve Yegge
f3afa149a5 fix: notification banner should say 'gt mail' not 'bd mail' 2025-12-21 10:41:27 -08:00
Steve Yegge
1e62d37b1e Merge fix/spawn-beads-path: add gt nudge command
Key changes:
- Add gt nudge command for reliable Claude session messaging
- spawn.go now uses NudgeSession instead of SendKeysDebounced
- Fix templates test to match actual deacon template text

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:30:30 -08:00
Steve Yegge
d2fccd580c feat(daemon): Add slot-based notification deduplication (gt-wpg)
Implement replaceable notifications to prevent heartbeat stacking when
agents are busy. Only the latest notification per slot is delivered.

Changes:
- Add NotificationManager for tracking pending notifications
- Add SendKeysReplace() that clears input line before sending
- Integrate slot tracking into daemon heartbeat pokes
- Mark notifications consumed when agent shows activity

The system tracks pending notifications in state files and skips
sending if a notification for the same slot is still pending.
When agent activity is detected (keepalive), slots are marked
consumed allowing new notifications to be sent.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:19:40 -08:00
Steve Yegge
9509afa6b1 feat(nudge): Add gt nudge command for reliable Claude session messaging
Encapsulates tmux send-keys with: literal mode, 500ms debounce, separate Enter.
Tested and reliable. Updates spawn.go to use NudgeSession.

Related: gt-1hf, gt-lz2

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:19:39 -08:00
Steve Yegge
2b32c27f29 spawn: Add work instruction + export SessionName
- Export session.Manager.SessionName for spawn.go access
- Add --address alias for --identity in mail inbox/check
- Send explicit work instruction to polecat after spawn
- Add CapturePaneLines and WaitForClaudeReady helpers (unused for now)
- Proper solution filed as gt-hb0 (needs Witness/Deacon AI monitoring)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 09:23:57 -08:00
Steve Yegge
478623f8bd Merge main with statusline fixes 2025-12-20 08:19:00 -08:00
Steve Yegge
d0259af61e spawn: Add work instruction + export SessionName
- Export session.Manager.SessionName for spawn.go access
- Add --address alias for --identity in mail inbox/check
- Send explicit work instruction to polecat after spawn
- Add CapturePaneLines and WaitForClaudeReady helpers (unused for now)
- Proper solution filed as gt-hb0 (needs Witness/Deacon AI monitoring)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 08:15:23 -08:00