MoonshotAI / MoonshotAI/kimi-code
Feature: config option to enable swarm mode by default for new sessions (config.toml default_swarm_mode)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Feature request
Add a config option (e.g. default_swarm_mode = true in config.toml, similar to default_plan_mode / default_permission_mode) so that new sessions start with swarm mode enabled by default.
Motivation
Users who work primarily in kimi web (and the TUI) may want swarm mode on for every session without manually toggling it each time. Today swarm mode is a per-session runtime toggle:
- TUI:
/swarm on|off(or/swarm <task>, which auto-disables when the turn completes) - Web UI: the swarm toggle in the composer
+menu
The 0.39 changelog notes that swarm/goal toggles are now kept per session in the web UI ("each session now keeps its own toggles"), which means the preference cannot persist across sessions. There is also no documented config.toml key or environment variable to make swarm mode default-on — the existing [swarm] section only controls timeout_ms for AgentSwarm subagents.
Proposed behavior
default_swarm_mode = true(top-level, defaultfalse) makes every new session start with swarm mode on, matching howdefault_plan_modeworks for Plan mode.- Resumed sessions keep the toggle state recorded for that session (consistent with current per-session toggle semantics).
- The per-session toggle (
/swarm on|off/ web UI toggle) continues to override the default within the session. - When swarm mode starts on via config and permission mode is
manual, the same auto/yolo permission prompt that/swarmtriggers today should apply.
Alternatives considered
- A
KIMI_CODE_SWARM_DEFAULT=1environment variable, alongside the config key, for containers/CI.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with config.toml and trace how default_plan_mode is read and applied when a new session starts. Compare that flow with the /swarm toggle and the web UI composer toggle. Done means a top-level default_swarm_mode setting enables swarm mode only for new sessions, while resumed sessions and per-session overrides retain their current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100