Repository navigation
fix(kiro): follow KIRO_HOME wherever lich reads Kiro's root - #918
Merged
Merged
Conversation
Every reader built ~/.kiro off the home alone, while Kiro CLI moves its whole root (agents, skills, settings, conversations) with KIRO_HOME. A user who set it got no transcript, cost or History rows, an agent installed where Kiro never looks, and a sandbox that did not bind the directory the session writes into. providers.KiroHome is now the one resolver: $KIRO_HOME when absolute, else ~/.kiro. The transcript lookup, the conversation list, the agent path, the agent's skill resource and the sandbox bind all go through it. Test helpers that plant files under ~/.kiro clear KIRO_HOME so a developer's environment cannot move the root from under them. Fixes #766 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q26HT8mThLBwUdXqSqzWpd
Collaborator
Author
|
The red Generated by Claude Code |
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.
Fixes #766.
What
Kiro CLI moves its whole root (agents, skills, settings, conversations) with
KIRO_HOME(2.21.0, already recorded indocs/providers/kiro.md), but every reader in lich built~/.kirooff the home alone. WithKIRO_HOMEset:kiroSessionPath)kiroConversations)lichagent carrying the hooks was installed under~/.kiro/agents, where Kiro never looks (providers.KiroAgentPath), and its global skills resource pointed at~/.kiro/skillsinternal/sandbox)How
providers.KiroHome(home)is the one resolver:$KIRO_HOMEwhen absolute, else~/.kiro. A relative value is ignored, the same rule asCursorConfigDirand the sandbox'senvDir. All five sites above go through it. The staleKiroAgentPathcomment ("honours no environment variable") is corrected.Tests
internal/providers/kiro_test.go: precedence, relative value ignored, agent path underKIRO_HOMETestKiroConversationsFollowKiroHome: the list andkiroSessionPathread underKIRO_HOMEand ignore~/.kiro. It fails without the fix.TestStateDirsFollowsHarnessEnvironment: the sandbox bindsKIRO_HOME~/.kiro(conversationHome,kiroHome,plantKiroSession,kiroTestHome,repairHome, the resume test,clearHarnessEnv) now clearKIRO_HOME, so a developer's own environment can't move the root out from under them. No assertion changed.Local gate:
gofmt -l .clean,go vet ./...clean,go test ./...green. No OS seam touched.CHANGELOG.md[Unreleased]› Fixed has an entry. Provider parity: this is a Kiro-only path bug with no new gap, sodocs/ceilings.mdand the README table are unchanged.Generated by Claude Code