Skip to content

Conversation

@kiloconnect
Copy link
Contributor

@kiloconnect kiloconnect bot commented Dec 20, 2025

Summary

This PR updates the CLI documentation to clarify the correct location for global custom modes in the CLI.

Problem

The CLI attempts to read global custom modes from ~/.kilocode/cli/global/settings/custom_modes.yaml, but the documentation didn't clearly explain this. Users who created global custom modes in the VSCode extension (which stores them at ~/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml on macOS) would find that those modes don't work in the CLI.

Changes

  1. New Documentation File: Added cli/docs/CUSTOM_MODES.md with comprehensive documentation including:

    • Clear explanation of the difference between CLI and VSCode extension paths
    • File locations for both global and project-level custom modes
    • Migration instructions for copying modes from VSCode to CLI
    • Complete guide on creating and using custom modes
    • Example custom mode configurations
    • Troubleshooting section
  2. Updated README: Added a "Custom Modes" section to cli/README.md with:

    • Quick reference to the correct CLI path
    • Note about the difference from VSCode extension
    • Link to detailed documentation
    • Quick start example

Key Points

  • CLI Global Modes: ~/.kilocode/cli/global/settings/custom_modes.yaml
  • VSCode Extension Global Modes: Platform-specific paths (e.g., ~/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml on macOS)
  • Project Modes: .kilocodemodes (works the same in both CLI and VSCode)

Testing

Documentation changes only - no code changes required.

Related Issues

Addresses user confusion about why global custom modes created in VSCode don't appear in the CLI.

- Add comprehensive CUSTOM_MODES.md documentation
- Clarify that CLI uses ~/.kilocode/cli/global/settings/custom_modes.yaml
- Explain difference between CLI and VSCode extension paths
- Provide migration instructions for copying modes from VSCode to CLI
- Add quick start guide in README
- Document that project-level modes work the same in both CLI and VSCode
@changeset-bot
Copy link

changeset-bot bot commented Dec 20, 2025

⚠️ No Changeset found

Latest commit: 6aa5987

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

@kiloconnect kiloconnect bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 3 Critical Issues Found

Severity Issue Location
CRITICAL Documentation contradicts actual CLI code behavior cli/README.md:238-241
CRITICAL Incorrect file path for global custom modes cli/docs/CUSTOM_MODES.md:15-17
CRITICAL Unnecessary migration instructions cli/docs/CUSTOM_MODES.md:103-130

Recommendation: Do not merge until the fundamental issue is resolved.

Summary

This PR's documentation states that the CLI uses ~/.kilocode/cli/global/settings/custom_modes.yaml for global custom modes. However, the actual CLI code in cli/src/config/customModes.ts reads from the VSCode extension's global storage path:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml
  • Windows: %APPDATA%/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml
  • Linux: ~/.config/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml

This means the CLI already shares global custom modes with the VSCode extension, contrary to what this documentation claims.

Impact

If merged as-is, users will:

  1. Create custom modes files in the wrong location (~/.kilocode/cli/...)
  2. Wonder why their modes don't work
  3. Perform unnecessary "migration" steps that accomplish nothing

Resolution Options

  1. Update the code to actually use ~/.kilocode/cli/global/settings/custom_modes.yaml (requires code changes in addition to this documentation)
  2. Update the documentation to reflect the actual behavior - that the CLI shares global modes with the VSCode extension (simpler fix, but changes the PR's intent)
Review Details (2 files)

Files: cli/README.md (1 issue), cli/docs/CUSTOM_MODES.md (2 issues)

Checked: Documentation accuracy against source code

Fix these issues in Kilo Cloud

Comment on lines +238 to +241
Kilo Code CLI supports custom modes that allow you to create specialized AI agents with specific roles and capabilities. Custom modes can be defined globally (available across all projects) or per-project.
**Important**: The CLI uses its own configuration directory for global custom modes:
- **CLI Global Modes**: `~/.kilocode/cli/global/settings/custom_modes.yaml`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 CRITICAL: Documentation contradicts actual code behavior

The documentation states the CLI uses ~/.kilocode/cli/global/settings/custom_modes.yaml, but the actual code in cli/src/config/customModes.ts shows the CLI reads from the VSCode extension's global storage path:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml
  • Windows: %APPDATA%/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml
  • Linux: ~/.config/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml

This means:

  1. Users following this documentation will create files in the wrong location
  2. The CLI actually does share global modes with the VSCode extension (contrary to what this PR claims)
  3. The migration instructions are unnecessary and misleading

Resolution options:

  1. Update the code to actually use ~/.kilocode/cli/global/settings/custom_modes.yaml (requires code changes)
  2. Update this documentation to reflect the actual behavior (CLI shares global modes with VSCode extension)

Comment on lines +15 to +17

**Important**: The CLI uses its own configuration directory for global custom modes, separate from the VSCode extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 CRITICAL: Incorrect file path - contradicts actual CLI code

This path ~/.kilocode/cli/global/settings/custom_modes.yaml does not match the actual code. The CLI code in cli/src/config/customModes.ts reads from the VSCode extension's global storage path, not this custom CLI path.

The entire premise of this documentation file is incorrect - the CLI does share global modes with the VSCode extension.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, and the cause of this bug.

Comment on lines +103 to +130

### Switch Modes During a Session

Use the `/mode` command within an active CLI session:

```
/mode my-custom-mode
```

## Migrating Global Modes from VSCode to CLI

If you've created global custom modes in the VSCode extension and want to use them in the CLI:

### macOS
```bash
# Create CLI config directory
mkdir -p ~/.kilocode/cli/global/settings
# Copy from VSCode extension to CLI
cp ~/Library/Application\ Support/Code/User/globalStorage/kilocode.kilo-code/settings/custom_modes.yaml \
~/.kilocode/cli/global/settings/custom_modes.yaml
```

### Linux
```bash
# Create CLI config directory
mkdir -p ~/.kilocode/cli/global/settings
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 CRITICAL: Migration instructions are unnecessary and misleading

These migration instructions tell users to copy files from VSCode to a CLI-specific location. However, the actual CLI code reads directly from the VSCode extension's global storage path.

If the CLI code is correct, these migration instructions should be removed entirely - global modes created in VSCode should already work in the CLI without any migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants