Skip to main content
← Back to list
01Issue
BugOpenSwamp CLI
AssigneesNone

swamp repo init --tool kiro does not create .kiro/settings/cli.json

Opened by webframp · 4/27/2026

Summary

swamp repo init --tool kiro (and swamp repo upgrade -t kiro) fails to create .kiro/settings/cli.json with {"chat.defaultAgent": "swamp"}. The init result reports settingsCreated: true but the file does not exist on disk.

Steps to reproduce

tmpdir=$(mktemp -d)
swamp repo init -t kiro --json "$tmpdir"
# Output includes: "settingsCreated": true
cat "$tmpdir/.kiro/settings/cli.json"
# cat: No such file or directory

Also reproducible with:

  • swamp repo init --force -t kiro on an existing repo
  • swamp repo upgrade -t kiro switching from claude

Expected behavior

.kiro/settings/cli.json should be created containing:

{
  "chat.defaultAgent": "swamp"
}

This is documented at https://swamp.club/manual/how-to/use-swamp-with-kiro which states init creates this file so that kiro-cli chat loads the swamp agent and audit hook.

Actual behavior

The file is never created. All other kiro files are created correctly:

  • .kiro/steering/swamp-rules.md
  • .kiro/agents/swamp.json
  • .kiro/hooks/swamp-audit.kiro.hook
  • .kiro/skills/
  • .vscode/settings.local.json
  • .kiro/settings/cli.json ✗ missing

Analysis

The ensureKiroCliDefaultAgent method in src/domain/repo/repo_service.ts (line ~1455) appears to execute without error and returns true, but the ensureDir + atomicWriteTextFile calls do not result in the file being persisted. The method's logic looks correct — it creates the directory, writes via atomic rename — but the file is absent after init completes. Possibly a Deno permissions or async ordering issue in the compiled binary.

Environment

  • swamp version: 20260423.134613.0-sha.fec0b92d
  • OS: Linux (NixOS on WSL2)
  • Kernel: 6.6.87.2-microsoft-standard-WSL2

Workaround

Manually create the file:

mkdir -p .kiro/settings
echo '{"chat.defaultAgent": "swamp"}' > .kiro/settings/cli.json
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

4/27/2026, 1:52:14 PM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

webframp commented 4/27/2026, 1:53:28 PM

This one is reported by kiro-cli

Sign in to post a ripple.