summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--internal/llm/tools/shell/shell.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/llm/tools/shell/shell.go b/internal/llm/tools/shell/shell.go
index e25bdf3ea..08d8a986b 100644
--- a/internal/llm/tools/shell/shell.go
+++ b/internal/llm/tools/shell/shell.go
@@ -47,7 +47,7 @@ func GetPersistentShell(workingDir string) *PersistentShell {
shellInstance = newPersistentShell(workingDir)
})
- if !shellInstance.isAlive {
+ if shellInstance == nil || !shellInstance.isAlive {
shellInstance = newPersistentShell(shellInstance.cwd)
}