Skip to content

feat: integration support beyond Claude Code #148

@hashedone

Description

@hashedone

Problem

TraceVault currently integrates only with Claude Code via its hook system (PreToolUse, PostToolUse, Stop). Teams using other AI coding harnesses get no session tracing — only git-level data from the pre-push / post-commit hooks.

Harnesses with hook systems (full integration possible)

Codex CLI — priority

Codex has a stable, first-class hook system that is essentially wire-compatible with Claude Code:

  • Events: PreToolUse, PermissionRequest, PostToolUse, UserPromptSubmit, Stop
  • Config: [[hooks.PreToolUse]] inline TOML in .codex/config.toml or .codex/hooks.json
  • Managed hooks via requirements.toml (org-level enforcement)
  • Each hook receives a JSON object on stdin — same pattern as CC

Implementation notes:

  • CursorAdapter stub in hooks/ should be replaced or supplemented with CodexAdapter
  • init command needs a install_codex_hooks path (writes to .codex/hooks.json)
  • Streaming protocol is identical — no server changes needed
  • ⚠️ Transcript format is explicitly unstable in Codex; is_error extraction via transcript scanning (added in feat(policies): add must_succeed flag to tool call policies #147) is not reliable for Codex. Hook payload itself must carry error state, or we accept is_error = NULL for Codex sessions.

Gemini CLI

Similar hook pattern to CC. Schema needs verification before claiming compatibility.

Harnesses without hook systems (git-level only)

These tools have no tool lifecycle hooks today. For them, only git-level data (commits, file changes) is available — no per-session or per-tool-call tracing.

  • Cursor — MCP config only, no hooks
  • Windsurf — MCP config only, no hooks
  • GitHub Copilot — runs inside VS Code extension, no external process lifecycle
  • Continue — config system, no tool hooks

For these, the only improvement possible short-term is ensuring the git hooks work reliably in their workflows.

Current state in codebase

  • crates/tracevault-cli/src/hooks/cursor.rs — stub, returns Err("not yet implemented")
  • hooks::detect_tools() detects .claude/ and .cursor/ dirs
  • init installs CC hooks only

Suggested order

  1. Codex CLI — highest value, hook system is stable and CC-compatible
  2. Gemini CLI — verify schema then same approach as Codex
  3. Revisit Cursor/Windsurf if their hook story evolves

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions