Skip to content

Claude Code and Codex hooks are failing and using hooks increase latency for agent responses #1137

@mrzilvis

Description

@mrzilvis

Summary

With Entire hooks enabled for OpenAI Codex and Claude Code, we see repeated hook failures (including hard 30s timeouts) and, separately, Claude Code / transcript integration hitting “transcript flush sentinel not found within timeout” on almost every turn. Together this makes the agent UX feel much slower than with hooks disabled.

Codex (IDE / Codex UI)

Observed hook failures (exact labels from Codex):

Hook Status Error
codex start/stopStop failed hook timed out after 30s
UserPromptSubmit failed hook timed out after 30s

Impact: Prompt submission and session teardown appear blocked or delayed until the hook deadline; subjectively this dominates perceived latency.

Additional warnings (same log stream, possibly related to race / .git/entire-sessions)

We occasionally see failed session state / failed to mark session ended with errors along the lines of:

  • rename .git/entire-sessions/<id>.json.tmp → .git/entire-sessions/<id>.json: no such file or directory
  • failed to get git common dir: context canceled

Expected behavior

  • Hooks complete within a predictable bound, or fail fast with a clear, actionable error.
  • No multi-second (or 30s) waits on the critical path for UserPromptSubmit / Stop.
  • Transcript flush either succeeds or documents why sentinel is optional without adding fixed delay every turn.

Actual behavior

  • Codex: UserPromptSubmit and Stop hooks fail with 30s timeout.
  • Claude Code: frequent transcript flush sentinel timeouts (≈3s from logged timeout field) after turn-end, which adds latency and noise even when checkpoints continue.
  • Overall: hooks make agent responses feel much slower than without Entire integration.

Steps to reproduce

  1. Prompt Claude Code on terminal
  2. Responds slowly (minutes for "hello" prompt)
  3. Remove hooks from .claude
  4. Prompting Claude Code for "hello" prompt
  5. Responds quickly

Entire CLI version

Entire CLI 0.5.6

OS and architecture

Darwin 25.2.0 arm64

Agent

Claude Code and Codex

Terminal

Codex Desktop App, Ghostty

Logs / debug output

### Claude Code (`entire` logs)

From `.entire/logs/entire.log`, we consistently see **WARN** lines on **`turn-end`** from component **`agent.claudecode`**:


{
  "level": "WARN",
  "msg": "transcript flush sentinel not found within timeout, proceeding",
  "component": "agent.claudecode",
  "agent": "claude-code",
  "timeout": 3000000000
}


**example**:


{"time":"2026-05-06T20:37:02.208Z","level":"INFO","msg":"turn-end","component":"lifecycle","agent":"claude-code","event":"TurnEnd","session_id":"<SESSION_A>","session_ref":"/Users/<user>/.claude/projects/<redacted-project-path>/<SESSION_B>.jsonl","model":""}
{"time":"2026-05-06T20:37:05.233Z","level":"WARN","msg":"transcript flush sentinel not found within timeout, proceeding","session_id":"<SESSION_A>","component":"agent.claudecode","agent":"claude-code","timeout":3000000000}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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