openwolf icon indicating copy to clipboard operation
openwolf copied to clipboard

Codex Support

Open rileycalhoun opened this issue 8 months ago • 4 comments

This project should have support with both Claude Code and Codex.

rileycalhoun avatar Mar 22 '26 03:03 rileycalhoun

Thanks for the issue. OpenWolf is built on Claude Code's hook system (PreToolUse, PostToolUse, SessionStart, Stop), which is how it intercepts reads and writes invisibly. Codex has a different agent architecture so it wouldn't be a straight port.

doctorfarhan avatar Mar 24 '26 06:03 doctorfarhan

It looks like Codex is in the process of supporting those hooks as we speak:

E.g. PreToolUse, merged in 3/23: https://github.com/openai/codex/pull/15211

Assuming Codex supports the same lifecycle hooks, is there anything else Claude specific that openwolf is built with?

kevinlowedev avatar Mar 24 '26 11:03 kevinlowedev

Good find, didn't know that PR was merged. If Codex ends up supporting the same lifecycle events (PreToolUse, PostToolUse, SessionStart, Stop), most of OpenWolf should work with minimal changes. The hooks are pure Node.js file I/O, nothing in them calls Claude-specific APIs.

The main Claude-specific piece is OPENWOLF.md, which is written for Claude's behavior patterns (how it decides whether to skip a read, how it updates cerebrum, etc). That would need to be adapted for however Codex responds to injected context. The core logic (anatomy, cerebrum, token tracking) is agent-agnostic.

Reopening this issue to track it properly. Thank you @kevinlowe0x3F7

cytostack avatar Mar 24 '26 11:03 cytostack

I opened a draft PR (#39) implementing a multi-agent runtime that adds support for Codex (and 4 others) via a per-agent AgentAdapter abstraction. Default openwolf init behavior is unchanged; new agents go through openwolf init --agent <name>. Honest about hook-protocol limitations per-agent — see PR body. Welcome thoughts on direction / scope before I take it out of draft.

ChasLui avatar May 09 '26 06:05 ChasLui