packages/kilo-docs/pages/automate/extending/shell-integration.md
Terminal Shell Integration is a key feature that enables Kilo Code to execute commands in your terminal and intelligently process their output. This bidirectional communication between the AI and your development environment unlocks powerful automation capabilities.
The new CLI and extension take a fundamentally different approach to shell execution. Instead of relying on VS Code's terminal shell integration, the CLI spawns and manages shell processes directly using the bash tool.
This means:
bash ToolThe bash tool is the primary way the agent executes shell commands. It spawns a persistent shell session and runs commands within it.
workdir parameter to run commands in a specific directory, instead of cd <dir> && <command> patternsCommands are parsed using Tree-sitter before execution, enabling:
The CLI automatically detects the appropriate shell for your platform using Shell.acceptable(). This selects a compatible shell (bash, zsh, etc.) without requiring manual configuration.
When using the Kilo Code VS Code extension with the Agent Manager, each agent session gets its own dedicated VS Code terminal.
Agent: {branch}, where {branch} is the git branch or worktree the session is working in| Shortcut | Action |
|---|---|
| <kbd>Cmd</kbd>+<kbd>/</kbd> | Focus the session's terminal |
| <kbd>Cmd</kbd>+<kbd>.</kbd> | Cycle agent mode |
Right-click in an Agent Manager terminal to access these actions:
Shell execution in the new CLI is significantly simpler than the VSCode version's terminal integration. Most issues are resolved by ensuring:
If commands fail to execute, check the CLI's log output for error details. The CLI logs the shell it detected and any errors during command execution.
If you've followed these steps and are still experiencing problems, please:
For additional help, join our Discord.