Skip to content

codex: scope implicit resume-last selection to the current Claude session#83

Merged
dkundel-openai merged 1 commit intoopenai:mainfrom
VOIDXAI:voidxai/issue-81-session-aware-resume
Apr 8, 2026
Merged

codex: scope implicit resume-last selection to the current Claude session#83
dkundel-openai merged 1 commit intoopenai:mainfrom
VOIDXAI:voidxai/issue-81-session-aware-resume

Conversation

@VOIDXAI
Copy link
Copy Markdown
Contributor

@VOIDXAI VOIDXAI commented Apr 1, 2026

Closes #81

Summary

  • scope implicit --resume-last selection to the current Claude session when a Claude session id is present
  • reuse the same session-aware selection logic for task-resume-candidate and task --resume-last
  • stop tasks from other sessions from being resumed implicitly or blocking the current session

Testing

  • node --test --test-name-pattern 'task-resume-candidate|task --resume-last|task --resume acts like --resume-last' tests/runtime.test.mjs
  • npm test

@VOIDXAI VOIDXAI requested a review from a team April 1, 2026 08:09
@ahamedjobayer081-spec
Copy link
Copy Markdown

/

@dkundel-openai dkundel-openai merged commit 40d213d into openai:main Apr 8, 2026
1 check passed
Crazytieguy added a commit to Crazytieguy/codex-plugin-cc that referenced this pull request Apr 15, 2026
Brings in auth-status-via-app-server (openai#177), session-scoped cancel
(openai#83,openai#84), older-CLI graceful fallback (openai#126), untracked-dir working
tree crash fix (openai#166), Windows SHELL handling (openai#178), the version
consistency checker, and related fixes.

Rejected from upstream: package rename back to @openai/*, version bump
to 1.0.3 (we are at 1.0.8), marketplace metadata.version field, the
$ARGUMENTS quoting fix in cancel/result/status slash commands (removed
in our fork), stop-review-gate test additions (feature removed), and
the README rewrite (ours is intentionally different).

Post-merge fixes:
- session-lifecycle-hook: use getCodexAvailability (lightweight) since
  the old getCodexLoginStatus was removed upstream.
- executePlanReviewRun: update orphaned ensureCodexReady call to
  ensureCodexAvailable (upstream renamed; our added code missed it).
- bump-version: drop metadata.version and plugins[codex].version
  targets since our marketplace.json omits them.
- package-lock.json: bump to 1.0.8.
- .claude/worktrees/.gitignore: ignore generated worktree contents.
- getCodexAuthStatus: on connect failure with a stale saved broker
  endpoint, clear the broker state and retry with disableBroker so a
  dead socket does not masquerade as a failed auth.
- runCommand: on Windows only honor $SHELL if it looks like a native
  drive-letter path; Git Bash / MSYS set SHELL to /usr/bin/bash which
  spawnSync cannot resolve.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
trunkszi added a commit to trunkszi/codex-plugin-cc that referenced this pull request Apr 16, 2026
…ndbox on spawn

In containers that preload libraries like libproxypermission_hook.so (which
hooks getuid/geteuid to spoof container-root as unprivileged), the inherited
env poisons codex's bubblewrap-based workspace-write sandbox, which fails
with "bwrap: Unexpected capabilities but not setuid, old file caps config?".
Every model-issued shell command then exits 1 and codex appears non-
functional even though the CLI itself is fine.

Fix on the single spawn point in SpawnedCodexAppServerClient#initialize:

  1) Drop LD_PRELOAD from the env handed to codex (whether the env came in
     via options or from process.env).
  2) Pass --dangerously-bypass-approvals-and-sandbox as the global flag
     (must precede the `app-server` subcommand). This matches deployments
     where the host already provides its own isolation and bwrap adds no
     value.

Test fixture: teach fake-codex-fixture.mjs to shift past the new global
flag so arg parsing still lands on `app-server`.

Test fix: update commands.test.mjs regexes to match the quoted "$ARGUMENTS"
introduced by upstream openai#168 (result.md / cancel.md). This was a missing
test update on the upstream side; picking it up makes our fork's CI one
step cleaner. Three remaining runtime.test failures are pre-existing on
upstream/main (verified by running the same suite on a detached
upstream/main worktree) and relate to the session-scoped job filtering
(openai#83/openai#84); they are out of scope here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

task --resume-last ignores current-session scoping and can resume another Claude session's task

3 participants