Runtime overview
Asymptote supports Kimi Code, Moonshot AI’s coding agent, through Kimi Code’s native lifecycle hooks sent tobeacon-hooks.
--harness kimi-code and --harness kimi-code-cli are aliases for the same
integration. The CLI, desktop app, VS Code extension, and ACP server all use the
same agent core and normalize to the kimi_code harness.
Kimi Code has no OpenTelemetry export.
KIMI_DISABLE_TELEMETRY controls
Moonshot’s own product telemetry, not Asymptote collection. Native hooks are the
entire integration surface.Prerequisites
- Install
kimi. It does not need to have been run before hook installation. - Run
beacon endpoint installso endpoint configuration and runtime log paths exist. - Start a new Kimi Code session, or run
/reload, after installing or removing hooks. Kimi Code readsconfig.tomlat startup.
Collection path
Asymptote appends managed entries to the[[hooks]] array in
$KIMI_CODE_HOME/config.toml. KIMI_CODE_HOME defaults to ~/.kimi-code.
Asymptote refuses to modify:
- a
config.tomlthat does not parse; - a config that declares
hooksas an inline array (hooks = [{ ... }]), because TOML does not permit appending[[hooks]]entries after it.
beacon endpoint discover reports the inline-array case as misconfigured.
Registered events
Asymptote subscribes to these Kimi Code hooks:
Beacon deliberately does not register
SessionHeartbeat, UserPromptQueued,
TurnStarted, TaskStarted, Notification, StopFailure, or Interrupt.
Those events would duplicate another event, create a heartbeat process merely
by subscribing, or assert a lifecycle state the endpoint schema cannot express
accurately.
Discovery and status
Show Kimi Code hook status
kimi_code with capability hooks, and emitted events use
harness.collection_method=hook. Inventory reports config.toml as native
configuration and marks it beacon_managed only when an Asymptote hook command
is present.
Install or configuration support
Telemetry coverage
Kimi’s
Read, ReadMediaFile, Glob, and Grep tools map to file reads.
Write and Edit map to file modifications, while Bash maps to command
execution. Failed writes remain tool.failed and do not generate a file diff
for a change that never landed.
Approvals and enforcement
Kimi Code exposes real operator decisions.approved maps to
approval.allowed; rejected, cancelled, and error map to
approval.denied, with approval.decision preserving the exact outcome.
Arguments from the decided call are retained, so command and file approval
rules can evaluate the actual operation.
Optional enforcement remains behind BEACON_POLICY_PROVIDER and fails open on
provider errors. Kimi only honors blocking responses for PreToolUse, Stop,
and UserPromptSubmit; a response to PermissionRequest is observation-only.
Known gaps
- No token usage or cost. Kimi’s compaction token count is not per-call usage.
- No assistant response text in hook payloads.
- No interruption event in the endpoint schema.
- No project-level hook configuration.
- Hooks are fail-open if a command times out, crashes, or exits unexpectedly.
Troubleshooting
KIMI_CODE_HOME, confirm the hook commands contain
--platform kimi, start a new session or run /reload, and inspect
$KIMI_CODE_HOME/logs/ for hook startup errors.
Related
Supported agent harnesses
Return to the runtime support overview.
Agent harness integration model
See how Asymptote discovers and configures each runtime.