## Why Terminal tools currently spawn a default shell when opening a new session, providing no way for tool authors or users to customize the initial environment or run setup commands. Additionally, the OpenCode container lacks common productivity tools (tmux, ranger) that developers expect in a modern terminal environment. These gaps limit the utility and customization of terminal-based tool instances. ## What Changes - Add `startup_command` field to tool type definitions, allowing tool authors to specify a command that runs for every new terminal session - Execute the startup command before the interactive shell when spawning new terminal sessions via WebSocket - Update the OpenCode container image to install `tmux` and `ranger` for improved developer experience - Update the OpenCode built-in tool type to optionally set a default startup command - Extend the tool type API and UI to support creating and editing `startup_command` ## Capabilities ### New Capabilities - `tool-terminal-startup-command`: Terminal tool types can define a startup command executed for each new session ### Modified Capabilities - `tool-types-definition`: Add `startup_command` field to the ToolType model and CRUD endpoints - `tool-terminal`: Terminal session spawning must execute the startup command before the interactive shell - `opencode-web-server`: OpenCode container image should include tmux and ranger ## Impact - **Backend**: ToolType model, API schemas, terminal session spawning logic - **Frontend**: Tool type creation/edit forms - **Infrastructure**: OpenCode Dockerfile or container build configuration - **Database**: Migration to add `startup_command` column to tool_types table - **APIs**: `POST/PUT /api/tool-types` will accept new `startup_command` field