entireio / entireio/cli

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

Open
#1,137 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.