polydev-ai 1.10.18 → 1.10.20

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.
Files changed (2) hide show
  1. package/lib/cliManager.js +15 -4
  2. package/package.json +1 -1
package/lib/cliManager.js CHANGED
@@ -1136,14 +1136,16 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
1136
1136
  console.log(`[CLI Debug] Codex using model: ${model}`);
1137
1137
  }
1138
1138
 
1139
- // Add standard flags and prompt
1139
+ // Add standard flags and direct-answer prompt
1140
+ // Prefix prevents Codex from doing agentic file/exec operations — just answer the question
1141
+ const directPrompt = `Answer this question directly from your knowledge. Do not execute any commands, read any files, or use any tools. Provide a concise, expert response.\n\n${prompt}`;
1140
1142
  args.push(
1141
1143
  '--full-auto',
1142
1144
  '--ephemeral',
1143
1145
  '--skip-git-repo-check',
1144
1146
  '--cd',
1145
1147
  workingDir,
1146
- prompt
1148
+ directPrompt
1147
1149
  );
1148
1150
 
1149
1151
  return new Promise((resolve, reject) => {
@@ -1431,7 +1433,13 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
1431
1433
  */
1432
1434
  buildStreamingArgs(providerId, prompt, model = null) {
1433
1435
  if (providerId === 'claude_code') {
1434
- const args = ['-p', '--output-format', 'stream-json', '--verbose', '--include-partial-messages', '--dangerously-skip-permissions'];
1436
+ // --disallowedTools blocks all tool use so Claude answers directly (~5-10s instead of 160s)
1437
+ // --max-turns 1 ensures single-turn response (no agentic loops)
1438
+ // DO NOT use --dangerously-skip-permissions — it enables all tools causing 160s web searches
1439
+ const args = ['-p', '--output-format', 'stream-json', '--verbose', '--include-partial-messages',
1440
+ '--max-turns', '1',
1441
+ '--disallowedTools', 'WebSearch,WebFetch,Bash,Read,Edit,Write,Grep,Glob,NotebookEdit,Agent,Task'
1442
+ ];
1435
1443
 
1436
1444
  // Add model flag if specified
1437
1445
  if (model) {
@@ -1453,7 +1461,10 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
1453
1461
  args.unshift('--model', cliModel);
1454
1462
  }
1455
1463
 
1456
- args.push(prompt);
1464
+ // Add direct-answer prefix to prevent agentic tool use (web search, file ops etc.)
1465
+ // Without this, Claude Code spends 160s doing agentic work instead of answering directly
1466
+ const directPrompt = `Answer this question directly from your knowledge. Do not use any tools, web searches, file operations, or external resources. Provide a concise, expert response in 2-4 paragraphs.\n\n${prompt}`;
1467
+ args.push(directPrompt);
1457
1468
  return args;
1458
1469
  }
1459
1470
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.10.18",
3
+ "version": "1.10.20",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },