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.
Files changed (2) hide show
  1. package/codex-session.mjs +14 -6
  2. 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` deliberately has no --sandbox option. The resumed
183
- // rollout retains the sandbox selected on its fresh first turn. Passing the
184
- // fresh-only flag here makes current Codex exit 2 before doing any work.
185
- ? ['exec', 'resume', '--json', '--skip-git-repo-check']
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
- // Resume retains the original sandbox. Start a fresh native thread on the
381
- // next turn so the selected mode is real, while ThinkPool keeps the lane log.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.209",
3
+ "version": "0.7.210",
4
4
  "description": "Share a local coding-agent CLI (Claude Code, Codex, Gemini, Aider, …) into a ThinkPool Code room, live.",
5
5
  "type": "module",
6
6
  "bin": {