From da7e05eb87c09b8390ab92c3dfb06a63cd7126fc Mon Sep 17 00:00:00 2001 From: Ed Zynda Date: Fri, 8 May 2026 10:44:01 +0300 Subject: [PATCH] fix(cmd): nil-guard CLI when emitting system-prompt notice in quiet mode SetupCLIForNonInteractive returns nil when --quiet is active, matching the pre-existing nil checks elsewhere in the same block (e.g. the buffered debug-message branch). Without this guard the new 'System Prompt loaded' notice panicked on quiet, non-interactive runs. Discovered via tmux smoke test of the #25 fix. --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 7a51bbcc..72fb08a1 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -811,7 +811,7 @@ func runNormalMode(ctx context.Context) error { } DisplayDebugConfig(cli, kitInstance, mcpConfig, parsedProvider) - if systemPromptLoadedMsg != "" { + if systemPromptLoadedMsg != "" && cli != nil { cli.DisplayInfo(systemPromptLoadedMsg) } }