diff --git a/docs/reference.md b/docs/reference.md index c28fcb27..dd25eec6 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -257,8 +257,18 @@ gt handoff --shutdown # Terminate (polecats) gt session stop / gt peek # Check health gt nudge "message" # Send message to agent +gt seance # List discoverable predecessor sessions +gt seance --talk # Talk to predecessor (full context) +gt seance --talk -p "Where is X?" # One-shot question ``` +**Session Discovery**: Each session has a startup nudge that becomes searchable +in Claude's `/resume` picker: +``` +[GAS TOWN] recipient <- sender • timestamp • topic[:mol-id] +``` +Example: `[GAS TOWN] gastown/crew/gus <- human • 2025-12-30T15:42 • restart` + **IMPORTANT**: Always use `gt nudge` to send messages to Claude sessions. Never use raw `tmux send-keys` - it doesn't handle Claude's input correctly. `gt nudge` uses literal mode + debounce + separate Enter for reliable delivery. diff --git a/internal/session/names.go b/internal/session/names.go index 4e83a185..5c8edeba 100644 --- a/internal/session/names.go +++ b/internal/session/names.go @@ -1,10 +1,7 @@ // Package session provides polecat session lifecycle management. package session -import ( - "fmt" - "time" -) +import "fmt" // Prefix is the common prefix for all Gas Town tmux session names. const Prefix = "gt-" @@ -39,25 +36,6 @@ func PolecatSessionName(rig, name string) string { return fmt.Sprintf("%s%s-%s", Prefix, rig, name) } -// SessionBeacon generates an identity beacon message for Claude Code sessions. -// This beacon becomes the session title in /resume picker, enabling workers to -// find their predecessor sessions. -// -// Format: [GAS TOWN]
-// -// Examples: -// - [GAS TOWN] gastown/crew/max • gt-abc12 • 2025-12-30T14:32 -// - [GAS TOWN] gastown/polecats/Toast • ready • 2025-12-30T09:15 -// - [GAS TOWN] deacon • patrol • 2025-12-30T08:00 -func SessionBeacon(address, molID string) string { - if molID == "" { - molID = "ready" - } - // Use local time in a compact format - timestamp := time.Now().Format("2006-01-02T15:04") - return fmt.Sprintf("[GAS TOWN] %s • %s • %s", address, molID, timestamp) -} - // PropulsionNudge generates the GUPP (Gas Town Universal Propulsion Principle) nudge. // This is sent after the beacon to trigger autonomous work execution. // The agent receives this as user input, triggering the propulsion principle: