Claude Code and Codex hooks are failing and using hooks increase latency for agent responses
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 475
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 178
Description
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/stop → Stop |
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 directoryfailed 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
timeoutfield) afterturn-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
- Prompt Claude Code on terminal
- Responds slowly (minutes for "hello" prompt)
- Remove hooks from .claude
- Prompting Claude Code for "hello" prompt
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Claude Code and Codex hook delays with Entire CLI 0.5.6, then inspect .entire/logs/entire.log for agent.claudecode, turn-end, UserPromptSubmit, and Stop events. Compare behavior with hooks enabled and disabled, including the .git/entire-sessions warnings. Done means hooks complete predictably or fail fast without fixed delays, and transcript flushing no longer adds repeated timeout latency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- cli, developer-experience, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100