Repository navigation
Add native Kiro CLI hook integration - #4831
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds first-class Kiro-CLI integration: agent kind and hook format, source-scoped feed-event classification and suppression, kiro-specific hook command/decision handling, launch sanitization and resume support, settings/UI/schema and environment wiring, localization, and tests. ChangesKiro-CLI Native Integration
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning, 1 inconclusive)
✅ Passed checks (15 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds native Kiro CLI hook integration alongside existing agent hooks: a new
Confidence Score: 5/5Safe to merge; the new Kiro path is additive and isolated behind its own hook format, disable env var, and source checks. All core logic — exit-2 propagation, fail-closed permission decisions, source-scoped side-effecting tool dispatch, and session-restore sanitization — is sound and follows established patterns for existing agents. The only gap is missing locale translations for 17 of the 20 supported languages, which does not affect runtime correctness. Resources/Localizable.xcstrings — the 12 new Kiro string keys need translations for the 17 locales beyond en/ja/ko, particularly the two search-alias keys where the analogous gemini key already has 19 translations. Important Files Changed
Sequence DiagramsequenceDiagram
participant K as kiro-cli
participant H as Kiro hook (shell)
participant C as cmux CLI
participant F as Feed/cmuxApp
K->>H: "preToolUse {tool, input}"
H->>C: cmux hooks feed --source kiro --event preToolUse
C->>C: FeedEventClassifier.classify(source:"kiro", event:"preToolUse")
alt side-effecting tool
C->>F: PermissionRequest card (actionable)
F-->>C: "decision {kind:"permission", mode:"once"|"deny"}"
alt "mode == allow"
C->>H: "print("{}") exit 0"
H-->>K: "{} (allow)"
else "mode == deny / unknown"
C->>H: exit(2)
H-->>K: exit 2 (block tool)
end
else read-only tool (standard/verbose level)
C->>F: PreToolUse card (non-actionable)
C->>H: "print("{}") exit 0"
H-->>K: "{} (allow)"
else "notification level == minimal"
C->>H: "print("{}") without Feed card"
H-->>K: "{} (allow)"
end
Reviews (8): Last reviewed commit: "Increase Kiro suppression-test feed.push..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
There are 5 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 88229db. Configure here.
Catch up 215 commits. Two main-side refactors needed semantic conflict resolution rather than picking a side: * Feed-event classification (typed FeedEventClassifier registry): register "kiro" with its camelCase events (preToolUse/postToolUse/userPromptSubmit/ agentSpawn/stop) and move Kiro's source-scoped side-effecting tool aliases + isSideEffectingTool into the classifier. Without this, Kiro's lowercase events fell through to .unknown and stopped escalating Feed approvals. Kept shouldSuppressKiroFeedEvent / emitKiroDecisionIfHandled in cmux.swift. * Settings SPM migration (CmuxSettings/CmuxSettingsUI): the in-app SettingsView is now dead code, so wire the Kiro toggle + notification-level picker into the live AutomationSection, with kiro catalog keys in the Integrations/Automation catalog sections. Also sync vendor/bonsplit to main's pointer (9166c36, forkConversation API) and add the requested `--agent cmux` activation hint to `cmux hooks kiro install` via a new AgentHookDef.postInstallNote. Regression coverage added in FeedEventClassificationTests plus an install-hint assertion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLI/cmux.swift`:
- Around line 30247-30262: emitKiroDecisionIfHandled currently treats any
non-"deny" non-empty mode as allowed; change it to a fail-closed policy by only
permitting when mode == "allow": inside emitKiroDecisionIfHandled, after
normalizing mode, check if mode == "allow" and in that case print the success
payload and return true; for all other cases (mode == "deny", mode == nil/empty,
or any other unexpected string) write a clear stderr message and exit with a
non-zero code (e.g., exit(2)) so unknown/typo modes are denied rather than
implicitly allowed.
In
`@Packages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizerAdditionalPolicies.swift`:
- Around line 350-397: The kiroPolicy declaration lacks optionalValueOptions and
variadicOptions—either add the missing entries to Policy(…) on the kiroPolicy
symbol if kiro-cli actually exposes flags with optional values or variadic
(space-separated list) arguments, or document in a short comment above
kiroPolicy why those fields are intentionally omitted (e.g., "kiro has no
optional-value or variadic flags"); check other policies like copilotPolicy for
the expected keys and semantics of optionalValueOptions and variadicOptions to
mirror the correct shape.
- Around line 377-383: The kiroPolicy currently lists "--resume" and "-r" only
in droppedOptions so AgentLaunchSanitizer's index increment via optionWidth(...)
treats them as flags (width 1) and leaves the following session-id token; update
kiroPolicy to include "--resume" and "-r" in the correct value-carrying set
(either valueOptions or optionalValueOptions) consistent with kiro-cli semantics
so optionWidth(...) returns the proper width and both the flag and its argument
are dropped; adjust whichever of valueOptions/optionalValueOptions in kiroPolicy
is appropriate for the CLI (or add a runtime-only width mapping used by
optionWidth) and keep droppedOptions entries as-is.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 355d8652-f49e-44a5-8c7a-eb4798cd6733
📒 Files selected for processing (30)
CLI/CMUXCLI+AgentHookDefinitions.swiftCLI/FeedEventClassifier.swiftCLI/cmux.swiftPackages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchEnvironmentPolicy.swiftPackages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizer.swiftPackages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizerAdditionalPolicies.swiftPackages/CmuxSettings/Sources/CmuxSettings/Keys/AutomationCatalogSection.swiftPackages/CmuxSettings/Sources/CmuxSettings/Keys/IntegrationsCatalogSection.swiftPackages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AutomationSection.swiftResources/Localizable.xcstringsSources/AgentHibernation/AgentHibernationLifecycleState.swiftSources/CmuxSettingsJSONPathSupport.swiftSources/CommandPalette/CommandPaletteSettingsToggle.swiftSources/GhosttyTerminalView.swiftSources/KeyboardShortcutSettingsFileStore+Template.swiftSources/KeyboardShortcutSettingsFileStore.swiftSources/RestorableAgentSession.swiftSources/RestorableAgentTypes.swiftSources/SettingsNavigation.swiftSources/SettingsSearchAliases.swiftSources/TaskManagerTypes.swiftSources/cmuxApp.swiftcmuxTests/CLIGenericHookPersistenceTests.swiftcmuxTests/FeedEventClassificationTests.swiftcmuxTests/GhosttyConfigTests.swiftcmuxTests/RestorableAgentHookProviderResumeTests.swiftcmuxTests/SessionPersistenceTests.swiftcmuxTests/WorkspaceUnitTests.swiftdocs/agent-hooks.mdweb/data/cmux.schema.json
Address CodeRabbit merge review: - emitKiroDecisionIfHandled now allows only the WorkstreamPermissionMode allow values (once/always/all/bypass) and fails closed (exit 2) on deny, missing, empty, or any unrecognized mode. Previously any non-deny, non-empty mode was implicitly allowed. (CodeRabbit's suggested `mode != "allow"` was incorrect — there is no `allow` mode in WorkstreamPermissionMode.) - Document why kiroPolicy omits optionalValueOptions/variadicOptions, and that --resume/-r are boolean (droppedOptions only) while --resume-id takes a value. - Add testKiroFeedAllowModesProceedAndUnknownModeDenies (all four allow modes exit 0; an unknown mode fails closed with exit 2). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@coderabbitai All three findings from your review have been addressed and you confirmed each in-thread (the fail-closed allowlist fix, the boolean |
|
(ノ◕ヮ◕)ノ*:・゚✧ ✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLI/cmux.swift`:
- Around line 30219-30245: Normalize the incoming Kiro hook event name in
shouldSuppressKiroFeedEvent by lowercasing/trimming hookEventName (or mapping
camelCase variants) before comparisons so checks against
"PreToolUse"/"PostToolUse" match real Kiro events like
"preToolUse"/"postToolUse"; update the switch and guard conditions that
reference hookEventName in shouldSuppressKiroFeedEvent to use the normalized
value and then apply the existing "minimal"/"standard"/"verbose" logic and
FeedEventClassifier.isSideEffectingTool(toolName, source: source) checks
unchanged.
In `@Sources/cmuxApp.swift`:
- Around line 5350-5353: The persisted kiroNotificationLevel string from
`@AppStorage` can contain unsupported raw values and bypass
KiroIntegrationSettings.notificationLevel(defaults:) normalization, causing the
picker to show no selection; create a Binding<String> (e.g.,
kiroNotificationLevelBinding) that in its getter converts the stored string to
the normalized enum via KiroIntegrationSettings.notificationLevel(defaults:),
returning that enum.rawValue, and in its setter writes the new rawValue back
into the `@AppStorage-backed` kiroNotificationLevel; then use selection:
kiroNotificationLevelBinding in the legacy Picker so the UI always reflects the
effective (normalized) setting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8adcc4b9-6f1e-4f1d-9a77-2d1c6f6ee8bd
📒 Files selected for processing (30)
CLI/CMUXCLI+AgentHookDefinitions.swiftCLI/FeedEventClassifier.swiftCLI/cmux.swiftPackages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchEnvironmentPolicy.swiftPackages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizer.swiftPackages/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizerAdditionalPolicies.swiftPackages/CmuxSettings/Sources/CmuxSettings/Keys/AutomationCatalogSection.swiftPackages/CmuxSettings/Sources/CmuxSettings/Keys/IntegrationsCatalogSection.swiftPackages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AutomationSection.swiftResources/Localizable.xcstringsSources/AgentHibernation/AgentHibernationLifecycleState.swiftSources/CmuxSettingsJSONPathSupport.swiftSources/CommandPalette/CommandPaletteSettingsToggle.swiftSources/GhosttyTerminalView.swiftSources/KeyboardShortcutSettingsFileStore+Template.swiftSources/KeyboardShortcutSettingsFileStore.swiftSources/RestorableAgentSession.swiftSources/RestorableAgentTypes.swiftSources/SettingsNavigation.swiftSources/SettingsSearchAliases.swiftSources/TaskManagerTypes.swiftSources/cmuxApp.swiftcmuxTests/CLIGenericHookPersistenceTests.swiftcmuxTests/FeedEventClassificationTests.swiftcmuxTests/GhosttyConfigTests.swiftcmuxTests/RestorableAgentHookProviderResumeTests.swiftcmuxTests/SessionPersistenceTests.swiftcmuxTests/WorkspaceUnitTests.swiftdocs/agent-hooks.mdweb/data/cmux.schema.json
👮 Files not reviewed due to content moderation or server errors (1)
- Sources/GhosttyTerminalView.swift
The CmuxSettingsUI Kiro card resolves `settings.automation.kiro.note` against the app bundle, where the existing xcstrings entry shadowed the package `defaultValue`, so the note rendered without the activation hint. Update the en/ja/ko note text to include the `kiro-cli chat --agent cmux` guidance, matching the `cmux hooks kiro install` output and the AutomationSection defaultValue. Verified live: the Settings > Automation > Kiro note now shows it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
5 issues found across 30 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- Localize the `cmux hooks kiro install` activation note via String(localized:) plus an en/ja/ko Localizable.xcstrings entry (cubic P2). - Add testKiroStandardLevelSuppressesReadOnlyToolFeedEvents: proves the standard-level Feed suppression triggers for real Kiro events (read-only fs_read suppressed, mutating fs_write emitted). This refutes the "event names never match" finding -- shouldSuppressKiroFeedEvent keys off the classified wire name (PostToolUse), not the raw camelCase event. Remaining round-2 findings verified as false positives / consistent-with-existing and answered on-thread: the resume bare-cd prefix is uniform across all agents, and the hook CLI fallback + XCTest integration harness match the established cross-agent pattern. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…tive-kiro-cli-hook # Conflicts: # Resources/Localizable.xcstrings
`kiro-cli chat --agent cmux` was effectively unusable: a Kiro custom agent config with no `tools` field is restricted to no tools, so the model could not run anything and the preToolUse/postToolUse Feed-approval hooks never fired. Add `tools: ["*"]` to the generated `~/.kiro/agents/cmux.json` (guarded by `== nil` so an existing user `tools` list is preserved). Verified end-to-end against real kiro-cli 2.5.0: with the fix, `kiro-cli chat --agent cmux` runs shell tools and fires preToolUse with tool_name=execute_bash (which kiroSideEffectingToolAliases escalates to a Feed approval). Added a regression assertion for the tools field to the install-shape test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
web/data/cmux.schema.json (1)
884-898:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd i18n support for Kiro integration setting descriptions
automation.kiroIntegrationandautomation.kiroNotificationLeveldefine user-facingdescriptionstrings directly (nodescriptionKey). There are no corresponding localizedweb/messages/*/schemaDescriptions.*kiro*entries, so the UI copy will not be localized for all locales inweb/i18n/routing.ts. Update the schema to usedescriptionKeyvalues and add complete translations for every locale.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/data/cmux.schema.json` around lines 884 - 898, The schema currently embeds English-only descriptions for automation.kiroIntegration and automation.kiroNotificationLevel; replace those description fields with descriptionKey entries (e.g., schemaDescriptions.automation.kiroIntegration and schemaDescriptions.automation.kiroNotificationLevel) in the cmux.schema.json and then add matching translation keys under web/messages/* (create schemaDescriptions.*kiro* entries) for every locale used by web/i18n/routing.ts so the UI can localize these strings across locales.CLI/CMUXCLI+AgentHookDefinitions.swift (2)
382-385: 🧹 Nitpick | 🔵 Trivial | ⚖️ Poor tradeoffExit code handling converts non-deny errors to success (fail-open).
The shell command correctly propagates exit code 2 (deny), but non-2 errors print
{}and implicitly exit 0 (from theechocommand's success). This means communication errors or other failures will allow the tool to proceed rather than failing closed.This is consistent with the existing
|| echo '{}'pattern used inagentHookShellCommand(line 379), and it's actually more secure than the generic wrapper since it preserves deny decisions rather than converting them to success. The fail-open behavior for non-deny errors appears to be an intentional design choice to maintain usability when cmux is unavailable.Consider whether fail-closed behavior (exit 2 for all errors) would be more appropriate for security-sensitive Kiro tool permissions, or document the current fail-open design decision.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@CLI/CMUXCLI`+AgentHookDefinitions.swift around lines 382 - 385, The exitTwoPropagatingAgentHookShellCommand currently prints '{}' on any non-2 error which returns a zero exit and causes fail-open; update the shell wrapper in exitTwoPropagatingAgentHookShellCommand to return a non-zero/deny exit for any cmux invocation failure (i.e., when status != 0 and status != 2) instead of echoing '{}', so that non-deny errors propagate as a failing/deny exit (preserve the existing behavior for status==2), and ensure the conditional logic still uses def.disableEnvVar and CMUX_* checks as currently referenced.
243-246:⚠️ Potential issue | 🟠 MajorFix incomplete localization for
cli.hooks.kiro.postInstallNote
Resources/Localizable.xcstringsdefines"cli.hooks.kiro.postInstallNote"only for localesen,ja, andko; it’s missing for:ar,bs,da,de,es,fr,it,km,nb,pl,pt-BR,ru,th,tr,uk,zh-Hans,zh-Hant.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@CLI/CMUXCLI`+AgentHookDefinitions.swift around lines 243 - 246, The localized string for postInstallNote (localized key "cli.hooks.kiro.postInstallNote", defined via postInstallNote: String(localized: ...)) is only present for en/ja/ko; add entries for the missing locales (ar, bs, da, de, es, fr, it, km, nb, pl, pt-BR, ru, th, tr, uk, zh-Hans, zh-Hant) in Resources/Localizable.xcstrings, providing either proper translations or a fallback (e.g., copy the English defaultValue) for each locale so the key exists for all listed languages and the app uses localized text instead of falling back unexpectedly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@CLI/CMUXCLI`+AgentHookDefinitions.swift:
- Around line 382-385: The exitTwoPropagatingAgentHookShellCommand currently
prints '{}' on any non-2 error which returns a zero exit and causes fail-open;
update the shell wrapper in exitTwoPropagatingAgentHookShellCommand to return a
non-zero/deny exit for any cmux invocation failure (i.e., when status != 0 and
status != 2) instead of echoing '{}', so that non-deny errors propagate as a
failing/deny exit (preserve the existing behavior for status==2), and ensure the
conditional logic still uses def.disableEnvVar and CMUX_* checks as currently
referenced.
- Around line 243-246: The localized string for postInstallNote (localized key
"cli.hooks.kiro.postInstallNote", defined via postInstallNote: String(localized:
...)) is only present for en/ja/ko; add entries for the missing locales (ar, bs,
da, de, es, fr, it, km, nb, pl, pt-BR, ru, th, tr, uk, zh-Hans, zh-Hant) in
Resources/Localizable.xcstrings, providing either proper translations or a
fallback (e.g., copy the English defaultValue) for each locale so the key exists
for all listed languages and the app uses localized text instead of falling back
unexpectedly.
In `@web/data/cmux.schema.json`:
- Around line 884-898: The schema currently embeds English-only descriptions for
automation.kiroIntegration and automation.kiroNotificationLevel; replace those
description fields with descriptionKey entries (e.g.,
schemaDescriptions.automation.kiroIntegration and
schemaDescriptions.automation.kiroNotificationLevel) in the cmux.schema.json and
then add matching translation keys under web/messages/* (create
schemaDescriptions.*kiro* entries) for every locale used by web/i18n/routing.ts
so the UI can localize these strings across locales.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0a52c0ef-cd8b-475b-86a0-3cb079d3a14e
📒 Files selected for processing (11)
CLI/CMUXCLI+AgentHookDefinitions.swiftCLI/cmux.swiftResources/Localizable.xcstringsSources/CmuxSettingsJSONPathSupport.swiftSources/GhosttyTerminalView.swiftSources/KeyboardShortcutSettingsFileStore.swiftSources/cmuxApp.swiftcmuxTests/CLIGenericHookPersistenceTests.swiftcmuxTests/GhosttyConfigTests.swiftcmuxTests/WorkspaceUnitTests.swiftweb/data/cmux.schema.json
The 1.5s XCTWaiter on the non-suppressed (fs_write) branch could count state.commands before the mock-server callback ran under CI load, flaking the assertion. Bump to 5s (the suppressed branch still times out silently). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
All findings from this review have been addressed and the threads resolved (fixes + verified false-positive explanations replied on-thread; CodeRabbit acknowledged each). Dismissing the stale changes-requested state.

Closes #2312.
Summary
cmux hooks kiroinstallation using Kiro agent config JSON at~/.kiro/agents/cmux.jsonor$KIRO_HOME/agents/cmux.jsonautomation.kiroIntegrationandautomation.kiroNotificationLevel(minimal,standard,verbose)kiro-cli chat --resume-id <session>and preserve safe Kiro launch environmentReferences
Validation
python3 -m json.tool Resources/Localizable.xcstrings >/dev/nullpython3 -m json.tool web/data/cmux.schema.json >/dev/nullgit diff --checkNo cloud-mac repro/video: this is a new feature, not a crash or visual bug.
Note
Medium Risk
Introduces Feed permission gating and exit-2 deny semantics for a new agent; behavior is well-tested and scoped to Kiro, but it touches approval paths and hook install defaults (
tools: ["*"]).Overview
Adds native Kiro CLI as a first-class cmux agent:
cmux hooks kiro installwrites~/.kiro/agents/cmux.json(or$KIRO_HOME/agents/) using a new Kiro agent JSON hook shape (timeout_ms, flat commands). Fresh installs defaulttools: ["*"]so pre/post tool hooks can run, and a post-install note tells users to usekiro-cli chat --agent cmux.Feed & permissions: Kiro’s camelCase events are registered in
FeedEventClassifier; mutating Kiro tool names escalate to actionable approvals via source-scoped aliases (other agents’ lowercase tools are unchanged). Feed hooks use a shell wrapper that propagates exit 2 for denies; resolved Feed permission modes map to allow ({}) or fail-closed deny (exit 2).CMUX_KIRO_NOTIFICATION_LEVEL/ Settings minimal · standard · verbose filter non-actionable Kiro tool telemetry.App integration: Session restore and launch sanitization for
kiro-cli chat --resume-id,CMUX_KIRO_PID, resume bindings, task manager / hibernation / restorable agent typing, Automation settings + schema + localization, and preserved launch env (KIRO_HOME, log vars).Reviewed by Cursor Bugbot for commit 6588760. Bugbot is set up for automated code reviews on this repo. Configure here.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Summary by cubic
Adds native Kiro CLI integration with session resume, Feed approvals, and a cleaner notification flow. The installer and Settings show a localized hint to run Kiro with
--agent cmux, and the generated Kiro agent config now enables tools so hooks actually fire.New Features
cmux hooks kiro installwrites hooks to~/.kiro/agents/cmux.jsonor$KIRO_HOME/agents/cmux.jsonwithtimeout_ms, grantstools: ["*"]on fresh install, and prints a localized tip to start withkiro-cli chat --agent cmux(Settings note shows this too).cmux(agentSpawn,userPromptSubmit,preToolUse/postToolUse,stop) with a Feed wrapper that preserves exit 2 on deny; tracks PID viaCMUX_KIRO_PID; improves shell/fs tool summaries (e.g.,execute_bash,fs_read/fs_write).minimalshows approvals only,standardsuppresses read‑only tools,verboseshows all (also viaCMUX_KIRO_NOTIFICATION_LEVEL).once/always/all/bypass;denyor missing/unknown mode fails closed with exit 2.kiro-cli chat --resume-id <id>with argument sanitization; preservesKIRO_HOME,KIRO_LOG_LEVEL,KIRO_LOG_NO_COLOR; publishes a surface resume binding.Migration
cmux hooks kiro install, then start Kiro withkiro-cli chat --agent cmux(or set it as default).automation.kiroNotificationLevel(orCMUX_KIRO_NOTIFICATION_LEVEL) to tune Feed.automation.kiroIntegrationor setCMUX_KIRO_HOOKS_DISABLED=1.Written for commit 6588760. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation