feat(FN-3815): quiet stderr logging for clean-exit MCP processes in pi-clau

Adds a changeset for FN-3815. The core change reclassifies clean-exit stderr output in the pi-claude-cli provider to reduce noisy logging, with corresponding test coverage distinguishing between clean and non-zero exit stderr handling.

Fusion-Task-Id: FN-3815
This commit is contained in:
Fusion
2026-05-11 01:18:33 -07:00
committed by gsxdsm
parent a59c84753d
commit a51e7791a5
3 changed files with 45 additions and 18 deletions

View File

@@ -252,7 +252,13 @@ export function streamViaCli(
if (broken) return; // Break-early kill, expected
const stderr = getStderr().trim();
if (stderr) {
console.warn(`[pi-claude-cli] Claude CLI stderr on close: ${stderr}`);
if (code === 0 || code === null) {
// FN-3815: Claude CLI writes benign MCP bring-up diagnostics to stderr
// on clean/abort shutdown; keep these debug-only to avoid false TUI warnings.
debugLog(`Claude CLI stderr on close (clean exit): ${stderr}`);
} else {
console.warn(`[pi-claude-cli] Claude CLI stderr on close: ${stderr}`);
}
}
if (code !== 0 && code !== null) {
const message = stderr