{"id":392268,"date":"2026-01-27T01:41:08","date_gmt":"2026-01-27T01:41:08","guid":{"rendered":"https:\/\/www.newsbeep.com\/uk\/392268\/"},"modified":"2026-01-27T01:41:08","modified_gmt":"2026-01-27T01:41:08","slug":"openai-spills-technical-details-about-how-its-ai-coding-agent-works","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/uk\/392268\/","title":{"rendered":"OpenAI spills technical details about how its AI coding agent works"},"content":{"rendered":"<p>It\u2019s worth noting that both <a href=\"https:\/\/github.com\/openai\/codex\" rel=\"nofollow noopener\" target=\"_blank\">OpenAI<\/a> and <a href=\"https:\/\/github.com\/anthropics\/claude-code\" rel=\"nofollow noopener\" target=\"_blank\">Anthropic<\/a> open-source their coding CLI clients on GitHub, allowing developers to examine the implementation directly, whereas they don\u2019t do the same for ChatGPT or the Claude web interface.<\/p>\n<p>An official look inside the loop<\/p>\n<p>Bolin\u2019s post focuses on what he calls \u201cthe agent loop,\u201d which is the core logic that orchestrates interactions between the user, the AI model, and the software tools the model invokes to perform coding work.<\/p>\n<p>As we <a href=\"https:\/\/arstechnica.com\/information-technology\/2025\/12\/how-do-ai-coding-agents-work-we-look-under-the-hood\/\" rel=\"nofollow noopener\" target=\"_blank\">wrote<\/a> in December, at the center of every AI agent is a repeating cycle. The agent takes input from the user and prepares a textual prompt for the model. The model then generates a response, which either produces a final answer for the user or requests a tool call (such as running a shell command or reading a file). If the model requests a tool call, the agent executes it, appends the output to the original prompt, and queries the model again. This process repeats until the model stops requesting tools and instead produces an assistant message for the user.<\/p>\n<p>That looping process has to start somewhere, and Bolin\u2019s post reveals how Codex constructs the initial prompt sent to OpenAI\u2019s Responses API, which handles model inference. The prompt is built from several components, each with an assigned role that determines its priority: system, developer, user, or assistant.<\/p>\n<p>The instructions field comes from either a user-specified configuration file or base instructions bundled with the CLI. The tools field defines what functions the model can call, including shell commands, planning tools, web search capabilities, and any custom tools provided through Model Context Protocol (MCP) servers. The input field contains a series of items that describe the sandbox permissions, optional developer instructions, environment context like the current working directory, and finally the user\u2019s actual message.<\/p>\n","protected":false},"excerpt":{"rendered":"It\u2019s worth noting that both OpenAI and Anthropic open-source their coding CLI clients on GitHub, allowing developers to&hellip;\n","protected":false},"author":2,"featured_media":392269,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[554,733,4308,86,56,54,55],"class_list":{"0":"post-392268","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-artificial-intelligence","8":"tag-ai","9":"tag-artificial-intelligence","10":"tag-artificialintelligence","11":"tag-technology","12":"tag-uk","13":"tag-united-kingdom","14":"tag-unitedkingdom"},"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts\/392268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/comments?post=392268"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts\/392268\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/media\/392269"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/media?parent=392268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/categories?post=392268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/tags?post=392268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}