Skip to content

Fix Claude backend CLI compatibility - #4

Open
HansBug wants to merge 1 commit into
obra:mainfrom
HansBug:fix/claude-backend-compat
Open

HansBug wants to merge 1 commit into
obra:mainfrom
HansBug:fix/claude-backend-compat

Conversation

@HansBug

@HansBug HansBug commented May 29, 2026

Copy link
Copy Markdown

Summary

Fixes the optional Claude backend against current Claude Code CLI behavior:

  • add --verbose when using claude -p --output-format stream-json;
  • run backend subprocesses with the requested --cwd as their actual process cwd, while keeping the existing prompt instruction behavior;
  • resume Claude threads with --resume <sessionId> instead of Codex's positional resume <threadId> syntax;
  • write --save-response from parsed assistant text for non-Codex backends, since Claude does not support Codex's --output-last-message flag.

This keeps Codex backend args unchanged and avoids introducing Claude-only flags beyond the currently required --verbose.

Fixes #3.

Testing

  • npm run typecheck
  • npm run lint
  • npm run build
  • npm run test

Note: I did not include a full-repo npm run format change because the current main branch already reports Prettier warnings across unrelated files. The files touched by this PR were formatted where needed.

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.

Claude backend compatibility issues with current Claude Code CLI

1 participant