Add multi-backend fixer support (Claude / Codex / Cursor) - #12
Open
Senna46 wants to merge 4 commits into
Open
Conversation
Document the design for abstracting the Claude CLI backend behind a BugFixer interface so Fixooly can dispatch to Claude, Codex, or Cursor CLIs via the AUTOFIX_FIXER environment variable.
Introduce a BugFixer abstraction so Fixooly can dispatch fix generation
to any of three CLIs at runtime, selected via the new AUTOFIX_FIXER
environment variable (required, no default):
- claude -- existing claude -p flow, moved into src/fixers/claudeFixer.ts
- codex -- new codex exec backend with --sandbox workspace-write
- cursor -- new agent -p backend with --force --trust --workspace, the
recommended default for daemon use (no per-hour rate limit
on the Cursor Pro Auto+Composer pool)
The child-process timeout, signal handling, stdin piping, and bounded
stdout capture are now centralised in src/fixers/spawnRunner.ts, and
the COMMIT_MSG / FIX_DETAIL marker parsing is centralised in
src/fixers/outputParser.ts (which also understands Cursor's JSON and
Codex's JSONL event streams).
FixGenerator no longer references claude directly; it accepts a
BugFixer through its constructor and delegates fix generation to it.
main.ts wires this up through createFixer() and delegates the
backend-specific prerequisite checks to the fixer itself.
Update the README, .env.example, and the two agent guides (CLAUDE.md / AGENTS.md) to reflect the new pluggable BugFixer architecture: - README gets a "Backend Selection" section that compares the three backends on subscription, headless auth, and rate limits, with install + auth instructions for each. The architecture mermaid is redrawn around the dispatched BugFixer instead of "claude -p", and the module overview lists the new src/fixers/* files. - .env.example is reorganised by backend and lists the required env vars per fixer (CURSOR_API_KEY / CODEX_API_KEY / Claude OAuth). AUTOFIX_FIXER is documented as required with no default. - CLAUDE.md / AGENTS.md describe the BugFixer interface, the new module dependency graph, and how to add a new backend without touching fixGenerator.ts.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ff70199. Configure here.
- Codex JSONL message not extracted Applied via Fixooly
Contributor
|
Fixooly committed fixes for 1 bug(s). (6729e01cb4)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
BugFixerinterface so Fixooly can dispatch to Claude CLI, OpenAI Codex CLI, or Cursor CLI depending on the new requiredAUTOFIX_FIXERenvironment variable..plans/multi-backend-fixer.plan.mdwalks through the comparison.src/fixers/spawnRunner.tsand theCOMMIT_MSG:/FIX_DETAIL:marker parsing insrc/fixers/outputParser.ts. The parser now also understands Cursor's JSON output and Codex's JSONL event stream.FixGeneratorkeeps the cloning / commit / push responsibilities and receives the activeBugFixervia constructor injection.main.tsinstantiates the right fixer throughcreateFixer()and delegatesverifyPrerequisites()to the backend itself.Files
src/fixers/{types,factory,claudeFixer,codexFixer,cursorFixer,spawnRunner,outputParser}.tssrc/types.ts,src/config.ts,src/fixGenerator.ts,src/main.tsREADME.md,.env.example,CLAUDE.md,AGENTS.mdTest plan
npm run typecheck-- zero errorsnpm run build--dist/produced without errorsAUTOFIX_FIXER=cursoragainst a real PR (deferred until the new Cursor Pro account is provisioned)AUTOFIX_FIXER=codexagainst a real PR (deferred until ChatGPT Plus is provisioned)AUTOFIX_FIXER=claudeagainst the existing setup (manual run on the daemon host)Out of scope
Closes #11
Note
Medium Risk
Breaking config (mandatory AUTOFIX_FIXER) and new untested CLI integrations change how fixes are applied and committed to PR branches; misconfiguration or parser/CLI mismatches could fail silently or produce bad commits.
Overview
This PR replaces the hard-coded Claude
claude -ppath with a pluggableBugFixerlayer so the daemon can run fixes through Cursor, Codex, or Claude CLIs.Configuration:
AUTOFIX_FIXERis now required (no default)—claude/codex/cursor—with optional per-backend model overrides (AUTOFIX_CURSOR_MODEL,AUTOFIX_CODEX_MODEL,AUTOFIX_CLAUDE_MODEL) and documented API keys in.env.example. Existing deployments must setAUTOFIX_FIXERexplicitly (e.g.claudeto keep prior behavior).Code: New
src/fixers/modules (types,factory, three fixer implementations,spawnRunner,outputParser) own CLI invocation, timeouts, and parsing ofCOMMIT_MSG:/FIX_DETAIL:across plain text, JSON, and JSONL.FixGeneratoronly clones, builds the prompt, callsfixer.generateFix, then commits/pushes;main.tswirescreateFixer(config)and delegates prerequisite checks to the selected backend.Docs: README, AGENTS.md, CLAUDE.md, and a plan file describe backend selection (Cursor recommended for daemons) and the updated architecture.
Reviewed by Cursor Bugbot for commit 6729e01. Bugbot is set up for automated code reviews on this repo. Configure here.