Skip to main content

Runtime overview

Asymptote supports Kimi Code, Moonshot AI’s coding agent, through Kimi Code’s native lifecycle hooks sent to beacon-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 install so endpoint configuration and runtime log paths exist.
  • Start a new Kimi Code session, or run /reload, after installing or removing hooks. Kimi Code reads config.toml at startup.

Collection path

Asymptote appends managed entries to the [[hooks]] array in $KIMI_CODE_HOME/config.toml. KIMI_CODE_HOME defaults to ~/.kimi-code.
config.toml can contain provider API keys in plain text. Asymptote appends its hook entries without re-serializing the rest of the file, then parses and compares the result before replacing the original. Existing settings, secrets, comments, and non-Asymptote hooks are preserved byte for byte.
Asymptote refuses to modify:
  • a config.toml that does not parse;
  • a config that declares hooks as an inline array (hooks = [{ ... }]), because TOML does not permit appending [[hooks]] entries after it.
beacon endpoint discover reports the inline-array case as misconfigured.
Kimi Code has no project-scoped hook configuration. --level project is refused instead of silently changing the user-wide config. To isolate telemetry for one project, set KIMI_CODE_HOME to a project-specific data root first.

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 reports as 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

Reinstall replaces Asymptote’s entries rather than adding duplicates. Uninstall removes only Asymptote entries and leaves the rest of the file unchanged.

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

If events are missing, check 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.

Supported agent harnesses

Return to the runtime support overview.

Agent harness integration model

See how Asymptote discovers and configures each runtime.