MoonshotAI / MoonshotAI/kimi-code

Process title (argv0) truncated to 'kimi-co' on session resume (-S) — breaks process-name-based agent detection

Open
#3,659 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Summary

When a Kimi Code session is resumed with kimi -S <session-id> (also observed on a fresh kimi -y launch on macOS — see herdrdev/herdr#3707), the process title is truncated to kimi-co instead of the full kimi-code. Fresh non-resume launches on Linux set the full title.

Downstream impact: terminal multiplexers / agent managers that detect a running kimi process by argv0 prefix (e.g. herdr) fail to recognize resumed sessions.

Environment

  • kimi-code 0.x (installed via npm, ~/.kimi-code/bin/kimi), Ubuntu 24.04, Linux 6.x
  • Observed 2026-09-06; also reported on macOS in herdrdev/herdr#3707

Reproduction

  1. Start a session: kimi in a terminal, note the session id.
  2. Exit, then resume: kimi -S <session-id>.
  3. In another shell: ps -o pid,comm,args -p <pid>comm shows kimi-co (15-char kernel comm limit is NOT the cause; argv0 in args is also kimi-co …, and fresh launches show the full kimi-code).

Expected

argv0 stays kimi-code (or the full configured title) regardless of fresh vs resumed session, so process-name detection is stable.

Notes

Likely a length-limited process-title write in the resume path (setproctitle-style). A safe alternative for downstream tooling is matching by executable path (/proc/<pid>/exe), but stable argv0 from kimi itself is the cleaner fix. Cross-reference: herdrdev/herdr#3707.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a fresh kimi launch and a resumed kimi -S <session-id> session, then inspect ps -o pid,comm,args to compare argv0 values. Trace the resume path and its process-title write; done means both fresh and resumed sessions consistently expose kimi-code or the full configured title, with process-name detection no longer failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.