惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
博客园_首页
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Vercel News
Vercel News
美团技术团队
D
Docker
WordPress大学
WordPress大学
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
Y
Y Combinator Blog
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
S
SegmentFault 最新的问题
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat: support /btw in CLI-backed sessions (#92669) · open...
joshavant · 2026-06-14 · via Recent Commits to openclaw:main

@@ -67,8 +67,26 @@ const CLAUDE_LEGACY_SKIP_PERMISSIONS_ARG = "--dangerously-skip-permissions";

6767

const CLAUDE_PERMISSION_MODE_ARG = "--permission-mode";

6868

const CLAUDE_SETTING_SOURCES_ARG = "--setting-sources";

6969

const CLAUDE_EFFORT_ARG = "--effort";

70+

const CLAUDE_BARE_ARG = "--bare";

71+

const CLAUDE_SAFE_MODE_ARG = "--safe-mode";

72+

const CLAUDE_TOOLS_ARG = "--tools";

73+

const CLAUDE_DISALLOWED_TOOLS_ARG = "--disallowedTools";

74+

const CLAUDE_MCP_CONFIG_ARG = "--mcp-config";

75+

const CLAUDE_STRICT_MCP_CONFIG_ARG = "--strict-mcp-config";

76+

const CLAUDE_NO_SESSION_PERSISTENCE_ARG = "--no-session-persistence";

77+

const CLAUDE_MAX_TURNS_ARG = "--max-turns";

78+

const CLAUDE_SESSION_ID_ARG = "--session-id";

79+

const CLAUDE_RESUME_ARG = "--resume";

80+

const CLAUDE_RESUME_SESSION_AT_ARG = "--resume-session-at";

81+

const CLAUDE_RESUME_SHORT_ARG = "-r";

82+

const CLAUDE_CONTINUE_ARG = "--continue";

83+

const CLAUDE_CONTINUE_SHORT_ARG = "-c";

84+

const CLAUDE_FORK_SESSION_ARG = "--fork-session";

7085

const CLAUDE_SAFE_SETTING_SOURCES = "user";

7186

const CLAUDE_BYPASS_PERMISSION_MODE = "bypassPermissions";

87+

const CLAUDE_DEFAULT_PERMISSION_MODE = "default";

88+

const CLAUDE_NO_TOOLS_VALUE = "";

89+

const CLAUDE_DENY_MCP_TOOLS_VALUE = "mcp__*";

72907391

type ClaudeCliEffort = "low" | "medium" | "high" | "xhigh" | "max";

7492

@@ -232,10 +250,89 @@ function stripClaudeEffortArgs(args: readonly string[]): string[] {

232250

return normalized;

233251

}

234252253+

const CLAUDE_SIDE_QUESTION_VARIADIC_VALUE_ARGS = new Set([

254+

"--allowedTools",

255+

"--allowed-tools",

256+

CLAUDE_DISALLOWED_TOOLS_ARG,

257+

"--disallowed-tools",

258+

CLAUDE_TOOLS_ARG,

259+

CLAUDE_MCP_CONFIG_ARG,

260+

]);

261+262+

const CLAUDE_SIDE_QUESTION_VALUE_ARGS = new Set([

263+

CLAUDE_PERMISSION_MODE_ARG,

264+

CLAUDE_SESSION_ID_ARG,

265+

CLAUDE_RESUME_ARG,

266+

CLAUDE_RESUME_SESSION_AT_ARG,

267+

CLAUDE_RESUME_SHORT_ARG,

268+

CLAUDE_MAX_TURNS_ARG,

269+

]);

270+271+

const CLAUDE_SIDE_QUESTION_BARE_ARGS = new Set([

272+

CLAUDE_CONTINUE_ARG,

273+

CLAUDE_CONTINUE_SHORT_ARG,

274+

CLAUDE_FORK_SESSION_ARG,

275+

CLAUDE_BARE_ARG,

276+

CLAUDE_SAFE_MODE_ARG,

277+

CLAUDE_STRICT_MCP_CONFIG_ARG,

278+

CLAUDE_NO_SESSION_PERSISTENCE_ARG,

279+

]);

280+281+

function stripClaudeSideQuestionConflictingArgs(args: readonly string[]): string[] {

282+

const normalized: string[] = [];

283+

for (let i = 0; i < args.length; i += 1) {

284+

const arg = args[i] ?? "";

285+

const equalsIndex = arg.indexOf("=");

286+

const argName = equalsIndex > 0 ? arg.slice(0, equalsIndex) : arg;

287+

if (CLAUDE_SIDE_QUESTION_BARE_ARGS.has(argName)) {

288+

continue;

289+

}

290+

if (CLAUDE_SIDE_QUESTION_VARIADIC_VALUE_ARGS.has(argName)) {

291+

if (equalsIndex < 0) {

292+

while (typeof args[i + 1] === "string" && !args[i + 1]?.startsWith("-")) {

293+

i += 1;

294+

}

295+

}

296+

continue;

297+

}

298+

if (CLAUDE_SIDE_QUESTION_VALUE_ARGS.has(argName)) {

299+

if (equalsIndex < 0) {

300+

const maybeValue = args[i + 1];

301+

if (typeof maybeValue === "string" && !maybeValue.startsWith("-")) {

302+

i += 1;

303+

}

304+

}

305+

continue;

306+

}

307+

normalized.push(arg);

308+

}

309+

return normalized;

310+

}

311+312+

function resolveClaudeCliSideQuestionExecutionArgs(baseArgs: readonly string[]): string[] {

313+

return [

314+

...stripClaudeSideQuestionConflictingArgs(stripClaudeEffortArgs(baseArgs)),

315+

CLAUDE_SAFE_MODE_ARG,

316+

CLAUDE_TOOLS_ARG,

317+

CLAUDE_NO_TOOLS_VALUE,

318+

CLAUDE_DISALLOWED_TOOLS_ARG,

319+

CLAUDE_DENY_MCP_TOOLS_VALUE,

320+

CLAUDE_STRICT_MCP_CONFIG_ARG,

321+

CLAUDE_NO_SESSION_PERSISTENCE_ARG,

322+

CLAUDE_MAX_TURNS_ARG,

323+

"1",

324+

CLAUDE_PERMISSION_MODE_ARG,

325+

CLAUDE_DEFAULT_PERMISSION_MODE,

326+

];

327+

}

328+235329

/** Resolve final Claude CLI execution args for one backend invocation. */

236330

export function resolveClaudeCliExecutionArgs(

237331

context: CliBackendResolveExecutionArgsContext,

238332

): string[] {

333+

if (context.executionMode === "side-question") {

334+

return resolveClaudeCliSideQuestionExecutionArgs(context.baseArgs);

335+

}

239336

const effort = mapClaudeCliThinkingLevelToEffort(context.thinkingLevel);

240337

if (!effort) {

241338

return [...context.baseArgs];