Repository navigation
docs(coding-agents): Kiro CLI application session tracing (TH-8287) - #928
Merged
Merged
Conversation
Kiro CLI hooks -> shared hook-to-OTLP emitter. New kiro_cli adapter: SessionStart (or AgentSpawn/agentSpawn) .. SessionEnd -> session, UserPromptSubmit .. Stop -> turn with assistant_response as opt-in output, Pre/PostToolUse -> FIFO-paired tool spans. CLI 2.x camelCase names mapped. Prints nothing on stdout. Follows the current Kiro hook docs (CLI V3 SessionStart is canonical), which supersede the PRD's Agent Spawn-only start. Adds the .kiro/hooks templates, install.sh, run_e2e.sh, the docs page and nav entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Guard commands, use a CLI-specific install scope, remove PreToolUse, and document V3 tool ids. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…/th-8287-kiro-cli Co-Authored-By: Claude Opus 5.5 <[email protected]>
… resume-safe SessionEnd (TH-8287) - Every shipped command (project file, global file, agent-profile entries, page snippets) is the canonical subshell guard `(python3 -B <emit.py> kiro_cli <Trigger> 2>/dev/null || true)` with the trigger on argv. The bare `|| true` form fed a trailing heredoc to `true`. - tests/test_kiro_cli_hooks_config.py runs every shipped command through sh/zsh/bash/dash with the payload on stdin and as a heredoc: emitter missing, python3 missing, installed (project, --user from another workspace, --user with KIRO_HOME, --agent-profile); exit 0, empty stdout, payload verbatim, no __pycache__, plus the unparenthesized regression and installer refusal cases. - Observe-only: the global template no longer registers PreToolUse (gating) and the adapter ignores it; tool spans come from PostToolUse without a duration; kiro.tool.name (duplicate of gen_ai.tool.name) dropped. - SessionEnd is not terminal (`kiro-cli chat --resume-id` reuses the session id): it closes a still-open turn (kiro.turn.ended_by=SessionEnd) and keeps the session state, so a resumed chat continues at turn-2 under the same root instead of overwriting turn-1. Tests for resume and Ctrl+C. - Templates renamed to fi-hook-to-otlp-kiro-cli*.json (the names installed); no sed rewrite. install.sh honours KIRO_HOME (writes that path into the commands), refuses where the Kiro IDE recipe is installed (project or ~/.kiro/hooks) and a project install when the global one exists, says when an existing file is stale, and adds --agent-profile (emitter only, prints the agent-profile hooks from agent-profile-hooks.json). - Fixture/page use the V3 tool id file_search; page: install paths and KIRO_HOME claim match the installer, guard explained, Windows caveat, IDE-in-same-project section with the agent-profile path, SessionEnd row with the 2.25 changelog source, kiro.hook.trigger on every 2.x span, /upgrade-agent instead of `agent migrate`, incomplete-turn text matches the code, Uninstall section. - run_e2e.sh HOOK_TRANSPORT=stdin|heredoc runs the installed commands. - Merged the foundation head 9b77d51 (emit.py prints nothing on failure). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er double exports (TH-8287) --agent-profile skipped every collision check, but a CLI session that uses an agent profile still loads every standalone .kiro/hooks/*.json file. It now refuses when ~/.kiro/hooks (or $KIRO_HOME/hooks) has the Kiro IDE recipe or this recipe's global file, and warns when the current directory's project has either one. --user now warns about a project install (or the Kiro IDE recipe) in the directory it runs from and says to remove project installs elsewhere, since it cannot see other projects. Project and --user installs warn when an agent profile already runs the emitter. The IDE-collision refusal no longer suggests --agent-profile, which does not avoid it. Tests and the page cover each case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
nik13
marked this pull request as ready for review
October 21, 2026 22:18
Merge main and replace the obsolete sidebar entry with shared catalog discovery. Keep installation on the maintained hook-to-OTLP helper, scope the guide to macOS CLI 2.31.1, remove verification diaries and the unavailable IDE link, and retain collision and privacy protections. Run the updated page and installer contracts in GitHub CI. Co-Authored-By: Claude Code <[email protected]>
Bring in main's Ubuntu 24.04 build runner so the current-head docs checks use the supported Playwright environment. Co-Authored-By: Claude Code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
GitHub CI runs the integration page contract, catalog/link checks, docs build, and macOS adapter/installer contracts. No local tests or builds are required.
TH-8287. Kiro IDE (TH-8286, #927) remains separate; this guide does not depend on its publication.
Generated with Claude Code