fix(kiro_cli): add new TUI fallback patterns + fix #137 exception handling #140
Merged
Conversation
…dling
1. New TUI support: Add fallback detection patterns for the new Kiro CLI
TUI prompt format ("ask a question, or describe a task"). The provider
still uses --legacy-ui for reliability but now supports both formats
in get_status() and extract_last_message_from_script().
2. Fix #137: load_agent_profile() was wrapping FileNotFoundError as
RuntimeError, but callers (terminal_service, mcp_server) only catch
FileNotFoundError. This caused assign() to fail for JSON-only agent
profiles. FileNotFoundError now passes through directly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tvignesw
approved these changes
Apr 1, 2026
erikmackinnon
pushed a commit
to erikmackinnon/cli-agent-orchestrator
that referenced
this pull request
Apr 3, 2026
…ion handling (awslabs#140) * fix(kiro_cli): add new TUI fallback patterns + fix awslabs#137 exception handling 1. New TUI support: Add fallback detection patterns for the new Kiro CLI TUI prompt format ("ask a question, or describe a task"). The provider still uses --legacy-ui for reliability but now supports both formats in get_status() and extract_last_message_from_script(). 2. Fix awslabs#137: load_agent_profile() was wrapping FileNotFoundError as RuntimeError, but callers (terminal_service, mcp_server) only catch FileNotFoundError. This caused assign() to fail for JSON-only agent profiles. FileNotFoundError now passes through directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: fix black formatting in test_kiro_cli_unit.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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
agent · model · ◔ N%/ask a question, or describe a task ↵. While--legacy-ui(fix(kiro_cli): add --legacy-ui flag for new Kiro CLI TUI compatibility #138) handles this now, these fallback patterns ensure CAO continues working if--legacy-uiis removed. Bothget_status()andextract_last_message_from_script()detect both formats.load_agent_profile()wrappedFileNotFoundErrorasRuntimeError, but callers only catchFileNotFoundError→assign()failed for AIM-installed JSON-only agents.FileNotFoundErrornow passes through directly.Closes #137
Changes
providers/kiro_cli.pyNEW_TUI_IDLE_PATTERN, new TUI header pattern; updateget_status(),extract_last_message_from_script(),get_idle_pattern_for_log()for dual-format supportutils/agent_profiles.pyFileNotFoundErrordirectly; updateresolve_provider()to catch both exception typesdocs/kiro-cli.md--legacy-uiusage, JSON profile troubleshootingCHANGELOG.mdtest/providers/test_kiro_cli_unit.pyTestKiroCliNewTuiSupport(6 tests: idle, completed, processing, extraction, permission, header pattern);test_get_idle_pattern_for_logtest/utils/test_agent_profiles.pytest_load_agent_profile_not_foundto expectFileNotFoundErrortest/utils/test_agent_profiles_coverage.pytest_skips_nonexistent_provider_dirto expectFileNotFoundErrorTest plan