Skip to content

fix(kiro_cli): add new TUI fallback patterns + fix #137 exception handling #140

Merged
haofeif merged 3 commits into
mainfrom
fix/kiro-new-tui-and-json-profiles
Apr 2, 2026
Merged

fix(kiro_cli): add new TUI fallback patterns + fix #137 exception handling #140
haofeif merged 3 commits into
mainfrom
fix/kiro-new-tui-and-json-profiles

Conversation

@haofeif

@haofeif haofeif commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #137

Changes

File Change
providers/kiro_cli.py Add NEW_TUI_IDLE_PATTERN, new TUI header pattern; update get_status(), extract_last_message_from_script(),
get_idle_pattern_for_log() for dual-format support
utils/agent_profiles.py Re-raise FileNotFoundError directly; update resolve_provider() to catch both exception types
docs/kiro-cli.md Document both prompt formats, --legacy-ui usage, JSON profile troubleshooting
CHANGELOG.md Add entries for both fixes
test/providers/test_kiro_cli_unit.py Add TestKiroCliNewTuiSupport (6 tests: idle, completed, processing, extraction, permission, header pattern);
update test_get_idle_pattern_for_log
test/utils/test_agent_profiles.py Update test_load_agent_profile_not_found to expect FileNotFoundError
test/utils/test_agent_profiles_coverage.py Update test_skips_nonexistent_provider_dir to expect FileNotFoundError

Test plan

  • 1050/1050 unit tests pass
  • 11/11 kiro-cli e2e tests pass (allowed_tools, assign, handoff, send_message, supervisor orchestration)

haofeif and others added 2 commits April 1, 2026 13:28
…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>
@haofeif haofeif added the bug Something isn't working label Apr 1, 2026
@haofeif haofeif merged commit 61a327a into main Apr 2, 2026
21 checks passed
@haofeif haofeif deleted the fix/kiro-new-tui-and-json-profiles branch April 2, 2026 02:40
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent profile discovery doesn't recognize AIM-installed kiro-cli agents (agent-spec.json)

2 participants