thinkpool-pair 0.7.209 → 0.7.210
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.
- package/codex-session.mjs +14 -6
- package/package.json +1 -1
package/codex-session.mjs
CHANGED
|
@@ -179,10 +179,18 @@ export function buildCodexPrompt({ text, rolePrompt, roomContext }) {
|
|
|
179
179
|
export function buildCodexExecArgs({ sessionId, model, effort, sandbox, approvalPolicy = 'untrusted', providerConfig, mcpUrl, writableDirs = [], prompt }) {
|
|
180
180
|
const safeSandbox = normalizeCodexSandbox(sandbox)
|
|
181
181
|
const args = sessionId
|
|
182
|
-
// `codex exec resume`
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
|
|
182
|
+
// `codex exec resume` has no --sandbox option and does NOT retain the fresh
|
|
183
|
+
// exec's sandbox: without an explicit override Codex falls back to its
|
|
184
|
+
// workspace profile (network=false). That silently removes the loopback
|
|
185
|
+
// ThinkPool MCP and blocks git metadata/network on turn two. Reassert the
|
|
186
|
+
// selected posture on every resume. Codex exposes a dedicated resume flag
|
|
187
|
+
// for full access; restricted modes ride the equivalent config override.
|
|
188
|
+
? [
|
|
189
|
+
'exec', 'resume', '--json', '--skip-git-repo-check',
|
|
190
|
+
...(safeSandbox === 'danger-full-access'
|
|
191
|
+
? ['--dangerously-bypass-approvals-and-sandbox']
|
|
192
|
+
: ['-c', `sandbox_mode="${safeSandbox}"`]),
|
|
193
|
+
]
|
|
186
194
|
: ['exec', '--json', '--sandbox', safeSandbox, '--skip-git-repo-check']
|
|
187
195
|
if (model) args.push('-m', model)
|
|
188
196
|
args.push('-c', `approval_policy="${approvalPolicy}"`)
|
|
@@ -377,8 +385,8 @@ export function startCodexSession({ cwd, model, effort: initialEffort = 'high',
|
|
|
377
385
|
activeMode = nextMode
|
|
378
386
|
modeConfig = codexConfigForMode(activeMode)
|
|
379
387
|
sandbox = modeConfig.sandbox
|
|
380
|
-
//
|
|
381
|
-
//
|
|
388
|
+
// A mode change deliberately starts a fresh native thread so no prior
|
|
389
|
+
// rollout can carry stale permission state; ThinkPool keeps the lane log.
|
|
382
390
|
sessionId = null
|
|
383
391
|
turnNo = 0
|
|
384
392
|
latestUsageSnapshot = null
|