Repository navigation
agentacct 0.12.3
Kimi Code work can finally be attributed.
Kimi Code passes no session id to the model or to stdio MCP servers, so sections an agent recorded over MCP landed without a client_session_id and never joined the session's usage. The one channel that carries it is a hook: Kimi's [[hooks]] scripts receive the authoritative session_id on stdin, and it is the same session_<uuid> the usage importer keys on.
agentacct hooks kimi-code installwrites an observe-only hook pack — the wrapper plus SessionStart / PreToolUse / SessionEnd entries in$KIMI_CODE_HOME/config.toml, each carrying only the four fields Kimi accepts — andonboard --scope global --agent kimi-codeinstalls it as the third leg next to the MCP registration and the AGENTS.md directive.- The hook records a tool-activity tick and writes a hook-context file with the session id and its own process ancestry; the MCP server resolves the same session by single-fresh candidate, strict env match, or unique pid lineage (ambiguity is refused rather than guessed), so a section recorded with
source=kimi-codeinherits the id. - Also fixed: every bridged client now writes a per-session context slot (Codex included), where previously only claude-code did and an MCP consumer could inherit a concurrent session's id.
mechanical_capture and automatic_install are experimental: payload mapping, TOML merge, context shape and selection rules are fixture-tested, and no real Kimi Code session has fired the hook yet.