Kill Shell
The Kill Shell tool terminates the current bash session and immediately starts a fresh one. It is used to recover from stuck processes, clear environment state, or reset the working directory context.
What It Does
Section titled “What It Does”- Terminates the active bash session (kills the process and any child processes)
- Starts a new, clean bash session in the same working directory
- Returns confirmation once the new session is ready
When It’s Used
Section titled “When It’s Used”The AI uses Kill Shell when:
- A command is hanging or running indefinitely and needs to be stopped
- The shell environment has become corrupted or polluted
- A long-running background process needs to be cleaned up before continuing
- You explicitly ask it to reset the shell
Example
Section titled “Example”“That server process seems stuck. Reset the shell and try running the tests again.”
The AI will invoke Kill Shell to terminate the current session, then start fresh and re-run the test command in the new session.
“The shell is unresponsive. Kill it and start over.”
Kill Shell terminates the hung session and provides a clean environment immediately.
Safety
Section titled “Safety”Kill Shell only terminates the per-conversation bash session that ChatShell manages — it does not affect your system’s terminal sessions or other processes outside of ChatShell’s scope.
After Kill Shell runs, the AI will have a fresh bash session available and can continue with subsequent Bash commands normally.
- Kill Shell is typically a last resort — the AI will first try to interrupt a command with
Ctrl+Cvia Bash before escalating to Kill Shell - The working directory is preserved across Kill Shell invocations (the new session starts in the same directory)