Skip to content

fix(smithy): preserve Codex interactive resume IDs#118

Open
furquanuddin94 wants to merge 4 commits into
stoneforge-ai:masterfrom
furquanuddin94:codex/codex-resume-id-capture
Open

fix(smithy): preserve Codex interactive resume IDs#118
furquanuddin94 wants to merge 4 commits into
stoneforge-ai:masterfrom
furquanuddin94:codex/codex-resume-id-capture

Conversation

@furquanuddin94
Copy link
Copy Markdown

@furquanuddin94 furquanuddin94 commented May 10, 2026

Summary

Fixes #117.

This PR depends on #116, which updates Codex interactive sessions to use the documented --sandbox workspace-write flag. This branch is stacked on top of that change.

Changes

  • Capture Codex interactive resume IDs only from the exact codex resume <uuid> continuation footer.
  • Request a Codex-specific graceful /exit when stopping an interactive session so Codex emits its continuation footer before session history is saved.
  • Hide and reject invalid legacy Codex provider session IDs so ordinary terminal text is not reused for resume.
  • Add a changeset for the Smithy package.

Test plan

  • bun test packages/smithy/src/providers/codex/provider.bun.test.ts
  • bun test packages/smithy/src/runtime/spawner.bun.test.ts
  • corepack pnpm --filter @stoneforge/smithy typecheck
  • corepack pnpm --filter @stoneforge/smithy-web typecheck
  • corepack pnpm --filter @stoneforge/smithy-server typecheck
  • git diff --check

Checklist

  • Tests pass
  • Typecheck passes
  • Changeset added (if applicable)

Extract the Codex interactive argument construction into buildCodexInteractiveArgs so the unit test exercises the same production arg-building logic used by spawn instead of duplicating that logic in the test. The helper preserves the existing working-directory, resume, and model behavior.

Codex now documents --sandbox workspace-write as the replacement for the deprecated --full-auto shortcut, so use the documented sandbox flag for fresh and resumed interactive sessions.

Refs stoneforge-ai#114.
…-flag

fix(smithy): update codex interactive sandbox flag
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.

bug: Codex interactive resume uses invalid provider session IDs

1 participant