fix(kiro): preserve task continuity and native boundaries - #2
Merged
Conversation
Adapt upstream empty-exec output and tool-catalog retention fixes while preserving fork replay/terminal behavior. Normalize only paired code-mode results after adjacent grouping; reserve exec without bypassing count or byte budgets. Add regression coverage and English/Korean troubleshooting guidance.
|
✅ PR quality gates passed This pull request now targets The |
Owner
Author
|
Validation note: the inherited enforce-target workflow fails with |
coseung2
marked this pull request as ready for review
September 12, 2026 00:47
Keep Responses commentary in Kiro history so tool-result continuations and checkpoint compaction retain decisions, completed work, and next steps. Preserve the anti-repeat completion contract and prove historical commentary is input-only rather than automatically re-emitted.
Split Kiro task-continuity policy, bidirectional CodeWhisperer codec, native auth/transport, and the stable ProviderAdapter facade without changing provider behavior. Add architecture-boundary tests and document the dependency rules, validation, rollback, and security review.
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
Fix three deterministic Kiro continuity gaps that could make completed work repeat: unexplained empty code-mode output, bounded tool catalogs dropping the execution path, and a fork-only optimization deleting assistant commentary from later tool rounds and compaction context.
Then structurally separate the Kiro direct-native integration so task-memory policy cannot accidentally be changed by auth/transport or wire-codec work. This PR intentionally targets
coseung2/opencodex:main.Upstream investigation
lidge-jun/opencodex#2819: empty exec-output guidance was missing from the fork while delivered-final termination was already present.lidge-jun/opencodex#2407,#2475,#2750: searched-tool priority and the code-mode execution-path reservation were missing.#2835,#3012,#3031, and#3750completion/result ownership behavior is preserved.037a30984blanked every Responsesphase=commentarymessage before rebuilding Kiro history. Current upstream preserves assistant text; this PR reverses only the memory deletion and keeps the useful anti-repeat instruction.Functional changes
text(...)/notify(...)output semantics so an empty successful exec cell is not interpreted as lost context.execroute inside Kiro count/byte limits.Native provider boundaries
Kiro remains a direct CodeWhisperer
GenerateAssistantResponseintegration, not another proxy hop. The former 2,163-linekiro.tsis split behind the stable adapter surface:kiro-continuity.ts: delivered-final/completion/fallback policy only; no network/auth.kiro-codec.ts: canonical history <-> KiroconversationStateand AWS eventstream <->AdapterEvent; no credential resolution or retry/fetch import.kiro-transport.ts: region/profile selection, CLI-vs-IDE envelope, native headers/endpoint, image-normalized serialization, retry-aware fetch, and stream-throttle cooldown recording.kiro.ts: 191-lineProviderAdapterfacade that composes the three layers and retains stable exports.tests/kiro-architecture-boundary.test.tspins these dependency rules. The detailed staged plan, invariants, rollback strategy, and implementation outcome are indevlog/_plan/260912_kiro_native_boundaries/000_plan.md.Validation
git diff --check: passed.a3f0fbe54; token selection, Builder-ID/profile handling, region/custom endpoint behavior, headers, diagnostics, and retry semantics are unchanged. No new credential source, network destination, permission, request-body logging, or account mutation was introduced.shutdown-launcherstartup-health failures on cleanmain. A post-refactor full run with a 240-second ceiling made steady progress but timed out inoauth-refresh-lock-multiprocess.test.tsbefore an aggregate was produced (exit 124).Scope and deployment
No real Kiro account request, credential mutation, deployment, merge, or operational restart was performed. The synthetic regressions prove the adapter contracts but do not claim every possible live model loop has the same cause.
Detailed evidence:
devlog/_plan/260912_kiro_task_continuity/000_findings.mddevlog/_plan/260912_kiro_native_boundaries/000_plan.md