Files
gastown/internal/cmd
mayor 809b0eb028 fix(hook): fall back to GT_ROLE when cwd detection fails
gt hook status failed with "cannot determine agent identity (role: unknown)"
when run from rig root directories like ~/gt/beads. The cwd-based detection
only recognizes specific agent directories (witness/, polecats/foo/, etc.)
but not rig roots.

Now falls back to GT_ROLE env var when detectRole returns unknown, matching
the pattern used by GetRoleWithContext and other role detection code.

Fixes gt-6pg

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:20:19 -08:00
..
2026-01-21 23:05:00 -08:00