Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/lib/TemplateSyncManager.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ function Sync-LauncherClaudeGlobalConfig {
-TargetDir (Join-Path $ProjectDir '.claude\agents') `
-Label '.claude/agents'

# v3.2.50 (E-2): slash commands を runtime 有効化 (39 ファイル)
Sync-ProjectTemplateDirectory `
-TemplateDir (Join-Path $StartupRoot 'Claude\templates\claudeos\commands') `
-TargetDir (Join-Path $ProjectDir '.claude\commands') `
-Label '.claude/commands'
Comment on lines +187 to +191

$settingsTemplatePath = Join-Path $StartupRoot 'scripts\templates\claude-settings.json'
Initialize-ProjectTemplate `
-TemplatePath $settingsTemplatePath `
Expand Down
7 changes: 7 additions & 0 deletions scripts/main/Start-ClaudeCode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,13 @@ chmod +x $(ConvertTo-BashSingleQuoted -Value $remoteBootstrap)
} else {
Write-Warn ".claude/agents/ activation exit=$LASTEXITCODE — Agent Teams は reference のみ"
}

# v3.2.50 (E-2): slash commands を runtime 有効化 (39 ファイル)
& $sshExeForMkdir -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new -o ControlMaster=no `
$linuxHost "mkdir -p '$linuxProject/.claude/commands' && cp -rf '$linuxProject/.claude/claudeos/commands/.' '$linuxProject/.claude/commands/' 2>/dev/null" 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Ok ".claude/commands/ activated (39 slash commands runtime)"
Comment on lines +459 to +463
}
Comment on lines +459 to +464

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

SSH 側の commands 有効化失敗がサイレントになります。

このブロックは失敗時の else が無く、stderr も抑制しているため、39 commands の runtime 有効化失敗を検知できません。Agent Teams と同様に失敗ログを出してください。

🔧 修正案(失敗時の可観測性を追加)
         & $sshExeForMkdir -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new -o ControlMaster=no `
             $linuxHost "mkdir -p '$linuxProject/.claude/commands' && cp -rf '$linuxProject/.claude/claudeos/commands/.' '$linuxProject/.claude/commands/' 2>/dev/null" 2>$null
         if ($LASTEXITCODE -eq 0) {
             Write-Ok ".claude/commands/ activated (39 slash commands runtime)"
+        } else {
+            Write-Warn ".claude/commands/ activation exit=$LASTEXITCODE — slash commands は reference のみ"
         }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# v3.2.50 (E-2): slash commands を runtime 有効化 (39 ファイル)
& $sshExeForMkdir -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new -o ControlMaster=no `
$linuxHost "mkdir -p '$linuxProject/.claude/commands' && cp -rf '$linuxProject/.claude/claudeos/commands/.' '$linuxProject/.claude/commands/' 2>/dev/null" 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Ok ".claude/commands/ activated (39 slash commands runtime)"
}
# v3.2.50 (E-2): slash commands を runtime 有効化 (39 ファイル)
& $sshExeForMkdir -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new -o ControlMaster=no `
$linuxHost "mkdir -p '$linuxProject/.claude/commands' && cp -rf '$linuxProject/.claude/claudeos/commands/.' '$linuxProject/.claude/commands/' 2>/dev/null" 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Ok ".claude/commands/ activated (39 slash commands runtime)"
} else {
Write-Warn ".claude/commands/ activation exit=$LASTEXITCODE — slash commands は reference のみ"
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/main/Start-ClaudeCode.ps1` around lines 459 - 464, The SSH copy/mkdir
block suppresses stderr and has no failure branch, so failures enabling
.claude/commands are silent; modify the block that calls $sshExeForMkdir (the
command that runs "mkdir -p '$linuxProject/.claude/commands' && cp -rf ...") to
stop swallowing stderr (remove or capture the redirections to 2>/dev/null and
2>$null) and add an else branch that logs the failure using Write-Error or
similar (include $LASTEXITCODE and the captured stderr/output) instead of only
calling Write-Ok on success; ensure the new failure log mirrors the Agent Teams
pattern so command-enable failures are observable.

}

Write-Info "Connecting via SSH: $linuxHost"
Expand Down
Loading