on main help sign in
feat(bash): set `CRUSH=1`, `AGENT=crush` and `AI_AGENT=crush` (#2484)

These ENVs can be used by tools to detect if they are being executed by Crush, via the Bash tool.

commit0f5df9bec255742fa46046ce2993399cdc5ebe67 authorAndrey Nering <andreynering@users.noreply.github.com> dateWed 25 Mar 2026, 13:08 (7 months ago) parentf67fa35
1 file changed+8
internal/shell/shell.go+8
internal/shell/shell.go+8
@@ -82,6 +82,14 @@ func NewShell(opts *Options) *Shell {
8282 env = os.Environ()
8383 }
8484
85+ // Allow tools to detect execution by Crush.
86+ env = append(
87+ env,
88+ "CRUSH=1",
89+ "AGENT=crush",
90+ "AI_AGENT=crush",
91+ )
92+
8593 logger := opts.Logger
8694 if logger == nil {
8795 logger = noopLogger{}