Two hard limits missing from the six-page agent engineering diagrams: 32 KiB and an 8-turn cap
Leo builds' six-page deck explains how top engineering teams build AI agent workflows. TwilightRush added two harness traps: Codex reads docs top-down from the repo root, and the nearest doc is truncated at 32 KiB; Claude Stop's 8-turn cap resets after tool calls. Handling rules: set project_doc_max_bytes, and in the stop hook check stop_hook_active and then exit. In the comments, there are also teams that skip parallel, use OpenSpec for SDD, and add docs after the PR.
Leo builds posted a six-page set of diagrams on How top engineering teams build with AI agents. The post was bookmarked by many people on X, and one commenter directly said these six pages are clearer than most YouTube tutorials. The original images are below.
Leo builds' original tweet covers top engineering teams' agent workflows in six pages. In a follow-up tweet, TwilightRush pointed out that pages 2 and 4 missed two harness traps. These two are more worth copying into config than the flowcharts.
The first is Codex's document reading. Codex walks down from the repo root, and when it reaches the nearest document it truncates at 32 KiB. If the root README or doc is too long, the latter half of the constraints gets cut off. The agent reads half the rules, so its output is naturally unstable. There are two fixes: set project_doc_max_bytes and raise the limit to the value you need; or slim down the root docs and move long content into subdirectories. Both paths work, but you need to make a clear choice. The default value won't decide for the team.
The second is Claude Stop's counting. Stop has an 8-turn cap, and tool calls reset the count. If you run a check in the stop hook without an exit condition, it can easily trigger repeatedly. TwilightRush's rule is exit on stop_hook_active. In other words, in the hook, check stop_hook_active first and exit if it is true; don't let the check turn into a loop itself.
The comments also show different approaches. One commenter said they mostly skip the parallel section, with a few developers using it occasionally; for the SDD part they use OpenSpec; and docs are added to Notion or Confluence after the PR. This feedback shows the six-page deck is a template, not something every item must be fully implemented. Team size, repo structure, and documentation habits vary, so implementation will take different shapes.
The six-page deck looks good, and the pitfalls are very concrete. On the Codex side, you need to decide whether to trim the root or bump the cap; on the Claude side, you need to write the stop_hook_active exit condition into the hook. Neither issue is huge, but if you miss them they become noise when the agent runs long tasks. Will your repo delete root docs or raise project_doc_max_bytes?
发布时间: 2026-12-07 02:25