Auto-Launch Configuration allows you to automatically start a Kilo Code task when opening a workspace, with support for specific profiles and modes. This was originally developed as an internal test feature, but we decided to expose it to users in case anyone finds it useful!
Info: Auto-Launch Configuration is particularly useful for testing the same prompt against multiple models or project directories.
When you open a workspace in VS Code, Kilo Code automatically checks for a launch configuration JSON file. If found, it:
- Switches to the specified provider profile (if provided)
- Changes to the specified mode (if provided)
- Launches a task with your predefined prompt
This happens seamlessly in the background, requiring no manual intervention.
- Create a
.kilocodedirectory in your workspace root (if it doesn't exist) - Create a
launchConfig.jsonfile inside the.kilocodedirectory - Configure your launch settings using the JSON format below
{
"prompt": "Your task description here",
"profile": "Profile Name (optional)",
"mode": "mode-name (optional)"
}prompt(string): The task message that will be sent to the AI when the workspace opens
-
profile(string): Name of an existing API Configuration Profile to use for this task. Must exactly match a profile name from your settings. -
mode(string): The Kilo Code mode to use for this task. Available modes:"code"- General-purpose coding tasks"architect"- Planning and technical design"ask"- Questions and explanations"debug"- Problem diagnosis and troubleshooting"test"- Testing-focused workflows- Custom mode slugs (if you have custom modes)
{
"prompt": "Review this codebase and suggest improvements for performance and maintainability"
}{
"prompt": "Create comprehensive unit tests for all components in the src/ directory",
"profile": "GPT-4 Turbo"
}{
"prompt": "Design a scalable microservices architecture for this e-commerce platform with focus on security and performance",
"profile": "🎻 Sonnet 4",
"mode": "architect"
}{
"prompt": "Optimize this algorithm for better time complexity and explain your approach",
"profile": "🧠 Qwen",
"mode": "code"
}- Project Templates: Include launch configurations in project templates to immediately start with appropriate AI assistance
- Code Reviews: Automatically trigger code review tasks when opening pull request branches
- Documentation: Launch documentation generation tasks for new projects
- Model Testing: Create different configurations to test how various AI models handle the same prompt
- A/B Testing: Compare approaches by switching between different profiles and modes
- Benchmarking: Systematically test AI performance across different scenarios
- Consistent Setup: Ensure all team members use the same AI configuration for specific projects
- Onboarding: Help new team members start with optimal AI settings automatically
- Standards: Enforce coding standards by launching with specific profiles and modes
The configuration file must be located at:
your-workspace/
└── .kilocode/
└── launchConfig.json
This file should be at the root of your workspace (the same level as your main project files).
- Auto-launch triggers approximately 500ms after Kilo Code extension activation
- The sidebar automatically receives focus before the task launches
- Profile switching happens before mode switching (if both are specified)
- The task launches after all configuration changes are applied
- If profile or mode switching fails, the task continues with current settings
- Verify file location:
.kilocode/launchConfig.jsonin workspace root - Check JSON syntax with a JSON validator
- Ensure
promptfield is present and not empty - Check VS Code Developer Console for error messages
- Verify the profile name exactly matches one from your settings
- Profile names are case-sensitive and must match exactly (including emojis)
- Check that the profile exists in your API Configuration Profiles
- Verify the mode name is valid (code, architect, ask, debug, test)
- For custom modes, use the exact mode slug from your configuration
- Mode names are case-sensitive and should be lowercase