Skip to content

Feature Request: Restore user-defined custom subagent types (removed in TypeScript rewrite) #502

@michael-wojcik

Description

@michael-wojcik

Feature Request: Restore user-defined custom subagent types (removed in TypeScript rewrite)

Summary

The TypeScript rewrite of kimi-code is a pure regression in extensibility compared to the legacy Python kimi-cli. The rewrite ported existing features (Skills, Flow Skills, built-in subagents) but removed the only feature that differentiated Kimi as a programmable agent platform: user-defined custom subagent types via the LaborMarket system.

What the legacy Python CLI already had

The old kimi-cli included:

  • Skills and Flow Skills/skill:<name> and /flow:<name> commands with SKILL.md discovery, identical to what's in the new CLI
  • Three built-in subagents (coder, explore, plan) — same as the new CLI
  • LaborMarket with user-defined custom subagent types — the only differentiating capability, now removed

The old LaborMarket supported:

  • YAML agent specifications under src/kimi_cli/agents/ with extend, exclude_tools, and subagents fields
  • Isolated subagent contexts under session/subagents/<agent_id>/
  • True delegation where parent agents received only result summaries
  • Runtime subagent creation for temporary tasks

The regression is not a trade-off

The new CLI's documentation frames this as "the legacy tool had no subagents," but that's misleading. The legacy tool had no built-in subagents at first — but it gained the same three built-ins (coder, explore, plan) while also retaining the LaborMarket for custom types. The new CLI kept the three built-ins and stripped out the extensibility layer.

There is no new capability in the TypeScript CLI that the Python CLI didn't already have. The rewrite appears to have sacrificed the only unique feature for... a faster TUI and npm distribution.

Why Skills/Flow Skills are not a substitute

Capability Legacy LaborMarket New Skills/Flow Skills
Isolated context window ✅ Yes ❌ No
True delegation with result summarization ✅ Yes ❌ No
User-defined agent types ✅ Yes ❌ No
Recursive agent hierarchies ✅ Yes ❌ No
Tool exclusion per agent ✅ Yes ❌ No
Multi-step workflow automation ✅ Flow Skills ✅ Flow Skills (same)

Skills and Flow Skills existed in both versions. They were never a replacement for subagents.

Kimi used to be better than Claude Code here

This is worth emphasizing: the legacy Python kimi-cli was superior to Claude Code in agent extensibility. Claude Code allows one-off custom agents, but it does not support agent inheritance — you cannot define a base agent and have custom agents extend it with modified tool sets or behaviors.

The old kimi-cli did exactly this via the extend and exclude_tools fields in YAML agent specs. You could build a hierarchy: a base reviewer agent, a security-reviewer that extends it with extra tools, and a performance-reviewer that extends it with a different tool subset. This was a genuine competitive advantage that Kimi had over Claude Code, and it was removed in the TypeScript rewrite for no technical reason.

Why this matters

Custom subagent types enable architectures that depend on distinct, delegatable agent roles with isolated state. The LaborMarket was the correct abstraction for multi-agent orchestration work. The new CLI forces all work through three built-in subagents, which breaks any architecture that requires custom agent roles.

Proposed solution

Re-introduce a user-defined subagent registry in the TypeScript CLI. Options:

  1. Port LaborMarket to TypeScript — allow .kimi/agents/ or similar directory with agent spec files (JSON/YAML/TS) that can extend base agents and exclude_tools
  2. Subagent-as-Skill — a new Skill category that, when invoked via /agent:<name>, spins up an isolated subagent context with its own tool set, rather than injecting prompts into the main thread
  3. Expose subagent API to Skills — allow a Skill to register itself as a subagent type with context isolation

This does not need to replace the three built-in subagents. It can be an opt-in power-user feature.

Conclusion

The TypeScript rewrite improved startup time and distribution, but it did so by removing the only capability that made kimi-cli competitive as an agent platform rather than just another terminal coding assistant. Worse, it removed a capability that Kimi had actually gotten right compared to its main competitor. Please restore custom subagent types so that kimi-code can serve both the mass-market terminal assistant use case and the advanced multi-agent orchestration use case.


Environment:

  • kimi-code version: latest TypeScript rewrite
  • Previous tool: kimi-cli (Python) with LaborMarket, custom YAML agent specs, Skills, and Flow Skills

Related references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions