What version of Kimi Code is running?
0.38.0
Which open platform/subscription were you using?
Kimi Code (kimi.com/code)
Which model were you using?
K3-256k thinking
What platform is your computer?
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 unknown
What issue are you seeing?
Launching the interactive TUI with --agent-file <path> silently ignores the flag: the startup session binds the built-in default agent instead of the agent defined in the file. The same flag works correctly in non-interactive print mode (kimi -p), so the agent file itself parses fine — the defect is specific to the interactive TUI startup path.
Evidence from the session wire log (~/.kimi-code/sessions/<wd>/<session>/agents/main/wire.jsonl):
profile.bind records profileName: "agent" (the default) with the stock ~20.9 KB system prompt; the agent file content appears nowhere in the log.
--yolo passed on the same command line DOES take effect (a second permission.set_mode: "yolo" event is recorded right after the config default), so this is not a general "TUI drops all launch flags" issue — it is specific to --agent-file.
- No warning is emitted to the session log or the global diagnostic log (
~/.kimi-code/logs/kimi-code.log) — the flag is dropped silently.
Print-mode control test on the same version and file binds correctly, with both syntaxes:
kimi -p "Reply with exactly: ok" --agent-file=test.md # → profileName: "codev-builder"
kimi --agent-file test.md -p "Reply with exactly: ok" # → profileName: "codev-builder"
What steps can reproduce the bug?
-
Create an agent file, e.g. test.md:
---
name: codev-builder
description: Codev builder role
---
# Custom instructions
...
-
Launch the TUI: kimi --yolo --agent-file test.md
-
Send any prompt.
-
Inspect the session wire log:
grep -o "\"profileName\":\"[^\"]*\"" \
~/.kimi-code/sessions/<wd>/<session>/agents/main/wire.jsonl
Reproduced across two separate TUI launches; both startup sessions bound the default agent.
What is the expected behavior?
profile.bind shows profileName: "codev-builder" and the agent file content is inlined into the system prompt, per the docs: "--agent-file registers a single agent file at the highest priority for this launch only and selects it ... in the TUI the flags bind only the startup session."
Additional information
Possibly related reports with the same "interactive TUI fails to apply agent profile configuration; -p print mode works" shape:
Contribution
What version of Kimi Code is running?
0.38.0
Which open platform/subscription were you using?
Kimi Code (kimi.com/code)
Which model were you using?
K3-256k thinking
What platform is your computer?
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 unknown
What issue are you seeing?
Launching the interactive TUI with
--agent-file <path>silently ignores the flag: the startup session binds the built-in default agent instead of the agent defined in the file. The same flag works correctly in non-interactive print mode (kimi -p), so the agent file itself parses fine — the defect is specific to the interactive TUI startup path.Evidence from the session wire log (
~/.kimi-code/sessions/<wd>/<session>/agents/main/wire.jsonl):profile.bindrecordsprofileName: "agent"(the default) with the stock ~20.9 KB system prompt; the agent file content appears nowhere in the log.--yolopassed on the same command line DOES take effect (a secondpermission.set_mode: "yolo"event is recorded right after the config default), so this is not a general "TUI drops all launch flags" issue — it is specific to--agent-file.~/.kimi-code/logs/kimi-code.log) — the flag is dropped silently.Print-mode control test on the same version and file binds correctly, with both syntaxes:
What steps can reproduce the bug?
Create an agent file, e.g.
test.md:Launch the TUI:
kimi --yolo --agent-file test.mdSend any prompt.
Inspect the session wire log:
Reproduced across two separate TUI launches; both startup sessions bound the default agent.
What is the expected behavior?
profile.bindshowsprofileName: "codev-builder"and the agent file content is inlined into the system prompt, per the docs: "--agent-fileregisters a single agent file at the highest priority for this launch only and selects it ... in the TUI the flags bind only the startup session."Additional information
Possibly related reports with the same "interactive TUI fails to apply agent profile configuration;
-pprint mode works" shape:tools/disallowedToolsfrontmatter policy is ignored in the TUI while-penforces it (same-day, v0.34.0).kimi web(SessionAgentProfileCatalogService), so newly written agent files are never dispatchable.secondary_modelhonored in print mode, ignored by the interactive TUI (v1 engine).Contribution