@gonzih/cc-discord 0.2.33 → 0.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -298,6 +298,12 @@ function spawnPersistentSession(ns, token, wire, onExit) {
|
|
|
298
298
|
const claudeBin = resolveClaude();
|
|
299
299
|
const env = buildEnv(token);
|
|
300
300
|
console.log(`[meta-agent-manager] spawning persistent session (ns=${ns})`);
|
|
301
|
+
// DO NOT ADD -p OR --input-format stream-json HERE.
|
|
302
|
+
// With -p + --input-format stream-json, Claude buffers all stdin until EOF before responding.
|
|
303
|
+
// Since the stdin pipe is never closed (it stays open for subsequent messages), Claude
|
|
304
|
+
// waits forever and never produces output. Interactive mode (no -p) reads one line at a
|
|
305
|
+
// time and responds immediately. Verified by direct test: `echo msg | claude --continue
|
|
306
|
+
// --output-format stream-json ...` responds correctly; the -p variant does not.
|
|
301
307
|
const proc = spawn(claudeBin, [
|
|
302
308
|
"--continue",
|
|
303
309
|
"--output-format", "stream-json",
|
|
@@ -346,6 +352,7 @@ export function createMetaAgentManager() {
|
|
|
346
352
|
if (!session)
|
|
347
353
|
return;
|
|
348
354
|
try {
|
|
355
|
+
// Interactive mode: plain text line, Claude reads it as user input
|
|
349
356
|
session.proc.stdin.write(`${line}\n`);
|
|
350
357
|
}
|
|
351
358
|
catch (err) {
|