{"id":4208,"date":"2026-08-24T18:00:00","date_gmt":"2026-08-24T18:00:00","guid":{"rendered":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/"},"modified":"2026-08-25T06:59:08","modified_gmt":"2026-08-25T06:59:08","slug":"put-your-own-logic-inside-the-codex-agentic-loop","status":"publish","type":"post","link":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/","title":{"rendered":"Put Your Personal Logic Contained in the Codex Agentic Loop"},"content":{"rendered":"<p><br \/>\n<\/p>\n<div>\n<p class=\"wp-block-paragraph\"> by way of prompts.<\/p>\n<p class=\"wp-block-paragraph\">We will describe the duty, give directions, and inform Codex what sort of outcome we count on. This enables us to regulate how the agent approaches its work.<\/p>\n<p class=\"wp-block-paragraph\">However generally, prompting just isn&#8217;t sufficient.<\/p>\n<p class=\"wp-block-paragraph\">We could wish to additional customise the execution by operating our personal logic at totally different phases of a Codex session.<\/p>\n<p class=\"wp-block-paragraph\">So, how can we do this?<\/p>\n<p class=\"wp-block-paragraph\">The reply is Codex hooks.<\/p>\n<p class=\"wp-block-paragraph\">On this publish, we\u2019ll discover the idea of hooks and perceive the place they match into the agentic loop. Then, we\u2019ll undergo a concrete case examine to show the idea.<\/p>\n<h2 class=\"wp-block-heading\">1. Understanding Codex hooks<\/h2>\n<p class=\"wp-block-paragraph\">When Codex works on a activity, it goes by way of an agentic loop.<\/p>\n<p class=\"wp-block-paragraph\">For a brand new session, the person sorts in a immediate, Codex analyzes the issue, calls instruments, and completes the duty. You may consider this complete problem-solving trajectory as a lifecycle, and at totally different factors on this lifecycle, Codex emits occasions with totally different occasion names:<\/p>\n<p>SessionStart: emitted when a session begins;<\/p>\n<p>PreToolUse: emitted when Codex is about to name a device;<\/p>\n<p>PostToolUse: emitted after the device finishes;<\/p>\n<p>Cease: emitted when Codex is able to end its response;<\/p>\n<p>SessionEnd: emitted when the Codex session ends.<\/p>\n<p class=\"wp-block-paragraph\">A Hook is the mechanism that enables us to connect our personal logic to those occasions. <\/p>\n<p class=\"wp-block-paragraph\">For instance, we may use SessionStart hook to load further context, or PreToolUse hook to examine a command earlier than it runs, or Cease hook to validate a outcome.<\/p>\n<p class=\"wp-block-paragraph\">So, what does it imply to connect logic to an occasion?<\/p>\n<p class=\"wp-block-paragraph\">Suppose we configure a hook for PreToolUse. Each time Codex is about to name a device, the hook runs a script. Codex passes details about that device name to the script as a part of the context. <\/p>\n<p class=\"wp-block-paragraph\">Selecting PreToolUse solely identifies a degree within the lifecycle. Many various device calls can happen at that time. Because of this, we\u2019d additionally want an identical rule to allow us to choose those we really care about. For instance, we may run the script solely when Codex is about to execute a shell command.<\/p>\n<p class=\"wp-block-paragraph\">Subsequently, there are three fundamental decisions when configuring a hook: <\/p>\n<p>At which level within the lifecycle ought to it run?<\/p>\n<p>Below what situations ought to it run at that time?<\/p>\n<p>What motion ought to it execute?<\/p>\n<p class=\"wp-block-paragraph\">In Codex, these correspond to the occasion, matcher, and handler. And that is the essential sample behind Codex hooks.<\/p>\n<h2 class=\"wp-block-heading\">2. Case examine: Including a high quality gate to deep analysis<\/h2>\n<p class=\"wp-block-paragraph\">On this case examine, we construct a small deep analysis workflow with Codex.<\/p>\n<p class=\"wp-block-paragraph\">Particularly, we\u2019ll ask Codex to analysis latest tendencies in a given subject. Codex will conduct internet searches and determine three essential tendencies from the previous 90 days. On the finish, it ought to return a structured analysis transient.<\/p>\n<p class=\"wp-block-paragraph\">To showcase the hook idea, we\u2019ll add a high quality examine simply earlier than Codex finishes. It\u2019ll confirm that the transient accommodates sufficient sources and that these sources come from an affordable number of domains.<\/p>\n<p class=\"wp-block-paragraph\">If the transient passes, Codex can end. If it fails, the hook will ship the issues again to Codex, and Codex will proceed researching inside the similar run till it satisfies our checks.<\/p>\n<h3 class=\"wp-block-heading\">2.1 Making ready the Analysis Process<\/h3>\n<p class=\"wp-block-paragraph\">We\u2019ll begin by getting ready a immediate template:<\/p>\n<p># Deep analysis activity<\/p>\n<p>Analysis **{{TOPIC}}**.<\/p>\n<p>Use sources revealed from **{{WINDOW_START}}** by way of **{{WINDOW_END}}**,<br \/>\ninclusive. Establish the three most essential tendencies in that interval and put together<br \/>\na concise, source-backed transient.<\/p>\n<p>Return a concise, source-backed analysis transient that follows the provided schema.<\/p>\n<p class=\"wp-block-paragraph\">To make sure structured output, we additionally put together a JSON schema:<\/p>\n<p>{<br \/>\n  &#8220;kind&#8221;: &#8220;object&#8221;,<br \/>\n  &#8220;additionalProperties&#8221;: false,<br \/>\n  &#8220;required&#8221;: [&#8220;summary&#8221;, &#8220;trends&#8221;],<br \/>\n  &#8220;properties&#8221;: {<br \/>\n    &#8220;abstract&#8221;: {<br \/>\n      &#8220;kind&#8221;: &#8220;string&#8221;<br \/>\n    },<br \/>\n    &#8220;tendencies&#8221;: {<br \/>\n      &#8220;kind&#8221;: &#8220;array&#8221;,<br \/>\n      &#8220;gadgets&#8221;: {<br \/>\n        &#8220;kind&#8221;: &#8220;object&#8221;,<br \/>\n        &#8220;additionalProperties&#8221;: false,<br \/>\n        &#8220;required&#8221;: [&#8220;title&#8221;, &#8220;summary&#8221;, &#8220;sources&#8221;],<br \/>\n        &#8220;properties&#8221;: {<br \/>\n          &#8220;title&#8221;: {<br \/>\n            &#8220;kind&#8221;: &#8220;string&#8221;<br \/>\n          },<br \/>\n          &#8220;abstract&#8221;: {<br \/>\n            &#8220;kind&#8221;: &#8220;string&#8221;<br \/>\n          },<br \/>\n          &#8220;sources&#8221;: {<br \/>\n            &#8220;kind&#8221;: &#8220;array&#8221;,<br \/>\n            &#8220;gadgets&#8221;: {<br \/>\n              &#8220;kind&#8221;: &#8220;string&#8221;<br \/>\n            }<br \/>\n          }<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n}<\/p>\n<p class=\"wp-block-paragraph\">We save this as schemas\/research_brief.schema.json. Word that that is additionally the construction our hook expects.<\/p>\n<h3 class=\"wp-block-heading\">2.2 Designing the High quality Gate<\/h3>\n<p class=\"wp-block-paragraph\">Subsequent, we outline what the hook ought to examine. <\/p>\n<p class=\"wp-block-paragraph\">Right here, we examine three issues:<\/p>\n<p>Every development ought to include at the very least two sources.<\/p>\n<p>The transient ought to include at the very least ten distinctive sources in whole.<\/p>\n<p>These sources should come from at the very least 5 distinctive domains.<\/p>\n<p class=\"wp-block-paragraph\">We will solely apply the checks after Codex has completed getting ready it. Which means a Cease hook is appropriate right here.<\/p>\n<p class=\"wp-block-paragraph\">We first create the validation script in .codex\/hooks\/validate_research.py:<\/p>\n<p>import json<br \/>\nimport sys<br \/>\nfrom urllib.parse import urlparse<\/p>\n<p>MIN_PER_TREND = 2<br \/>\nMIN_SOURCES = 10<br \/>\nMIN_DOMAINS = 5<\/p>\n<p>occasion = json.load(sys.stdin)<br \/>\ntransient = json.hundreds(occasion[&#8220;last_assistant_message&#8221;])<\/p>\n<p>errors = []<br \/>\nall_urls = set()<\/p>\n<p>for quantity, development in enumerate(transient[&#8220;trends&#8221;], 1):<br \/>\n    urls = set(development[&#8220;sources&#8221;])<br \/>\n    all_urls.replace(urls)<\/p>\n<p>    if len(urls) &lt; MIN_PER_TREND:<br \/>\n        errors.append(f&#8221;Pattern {quantity} wants at the very least {MIN_PER_TREND} sources.&#8221;)<\/p>\n<p>domains = {<br \/>\n    urlparse(url).netloc<br \/>\n    for url in all_urls<br \/>\n}<\/p>\n<p>if len(all_urls) &lt; MIN_SOURCES:<br \/>\n    errors.append(f&#8221;Add at the very least {MIN_SOURCES} distinctive sources.&#8221;)<\/p>\n<p>if len(domains) &lt; MIN_DOMAINS:<br \/>\n    errors.append(f&#8221;Use at the very least {MIN_DOMAINS} supply domains.&#8221;)<\/p>\n<p>if errors:<br \/>\n    message = &#8220;Analysis transient examine failed:n- &#8221; + &#8220;n- &#8220;.be a part of(errors)<br \/>\n    outcome = {&#8220;resolution&#8221;: &#8220;block&#8221;, &#8220;motive&#8221;: message}<br \/>\nelse:<br \/>\n    outcome = {}<\/p>\n<p>print(json.dumps(outcome))<\/p>\n<p class=\"wp-block-paragraph\">When the Cease occasion is emitted, Codex passes in last_assistant_message, which follows the schema we outlined earlier. Our script can then parse this response right into a Python dictionary and iterate over the tendencies and gather their sources in a set.<\/p>\n<p class=\"wp-block-paragraph\">Subsequent, we use urlparse to extract the area from every distinctive URL. After that, we are able to apply our checks.<\/p>\n<p class=\"wp-block-paragraph\">If any examine fails, the script would return a block resolution along with the errors:<\/p>\n<p>{<br \/>\n  &#8220;resolution&#8221;: &#8220;block&#8221;,<br \/>\n  &#8220;motive&#8221;: &#8220;Analysis transient examine failed:n- Add at the very least 10 distinctive sources.&#8221;<br \/>\n}<\/p>\n<p class=\"wp-block-paragraph\">Word that for the Cease occasion, block doesn\u2019t terminate the run; it simply prevents Codex from ending. Codex can use the suggestions to enhance the transient inside the similar run.<\/p>\n<p class=\"wp-block-paragraph\">Now we have to outline the hook to inform Codex when and  execute it. We do that in .codex\/hooks.json:<\/p>\n<p>{<br \/>\n  &#8220;hooks&#8221;: {<br \/>\n    &#8220;Cease&#8221;: [<br \/>\n      {<br \/>\n        &#8220;hooks&#8221;: [<br \/>\n          {<br \/>\n            &#8220;type&#8221;: &#8220;command&#8221;,<br \/>\n            &#8220;command&#8221;: &#8220;python3 .codex\/hooks\/validate_research.py&#8221;,<br \/>\n            &#8220;commandWindows&#8221;: &#8220;python .codexhooksvalidate_research.py&#8221;<br \/>\n          }<br \/>\n        ]<br \/>\n      }<br \/>\n    ]<br \/>\n  }<br \/>\n}<\/p>\n<p class=\"wp-block-paragraph\">Codex at the moment doesn&#8217;t apply matchers to the Cease occasion. So we didn\u2019t outline any within the configuration above.<\/p>\n<h3 class=\"wp-block-heading\">2.3 Operating a Concrete Analysis Process<\/h3>\n<p class=\"wp-block-paragraph\">As a take a look at, I requested Codex to analysis latest tendencies in data-center infrastructure:<\/p>\n<p>{<br \/>\n  &#8220;subject&#8221;: &#8220;latest tendencies in data-center infrastructure&#8221;,<br \/>\n  &#8220;as_of&#8221;: &#8220;2026-08-01&#8221;,<br \/>\n  &#8220;lookback_days&#8221;: 90<br \/>\n}<\/p>\n<p class=\"wp-block-paragraph\">After inserting these values into our immediate template, we save the rendered immediate to outputs\/research_prompt.md.<\/p>\n<p class=\"wp-block-paragraph\">Earlier than the primary run, you&#8217;ll be able to open Codex within the undertaking listing and use \/hooks to assessment the hook.<\/p>\n<p class=\"wp-block-paragraph\">On this case, we\u2019ll run the duty in headless mode with exec:<\/p>\n<p>codex &#8211;search exec<br \/>\n  &#8211;model gpt-5.6-sol<br \/>\n  &#8211;json<br \/>\n  &#8211;output-schema schemas\/research_brief.schema.json<br \/>\n  -o outputs\/research_brief.json<br \/>\n  &#8211;<br \/>\n  &lt; outputs\/research_prompt.md<br \/>\n  &gt; outputs\/run.jsonl<\/p>\n<p class=\"wp-block-paragraph\">A few issues value mentioning:<\/p>\n<p>exec: runs Codex non-interactively.<\/p>\n<p>&#8211;search: provides the agent entry to internet search.<\/p>\n<p>&#8211;model: selects the mannequin used for the run.<\/p>\n<p>&#8211;output-schema: that is the place we provide our pre-defined schema to constrain the agent output.<\/p>\n<p>-o: this implies we save the agent\u2019s response to the goal location.<\/p>\n<p>&#8211;json: this makes Codex emit its execution occasions as JSONL. We redirect this occasion stream to outputs\/run.jsonl, which provides us a hint of the run.<\/p>\n<p>-: tells Codex to learn the immediate from customary enter.<\/p>\n<p>&lt;: This operator provides outputs\/research_prompt.md as that enter.<\/p>\n<p class=\"wp-block-paragraph\">Throughout my take a look at, I see that Codex first produced three tendencies supported by seven distinctive sources. Every development had greater than two sources, however the transient didn&#8217;t meet our total requirement of ten.<\/p>\n<p class=\"wp-block-paragraph\">Our Cease hook labored, as Codex acquired this suggestions:<\/p>\n<p>The transient wants broader corroboration. I\u2019m including at the very least three<br \/>\nimpartial, in-window sources whereas preserving the identical three<br \/>\nevidence-supported tendencies.<\/p>\n<p class=\"wp-block-paragraph\">After one other spherical, Codex lastly produced an up to date transient with 12 distinctive sources from 10 domains. <\/p>\n<p class=\"wp-block-paragraph\">The ultimate transient recognized three main tendencies: the rise of gigawatt-scale AI campuses, energy entry and allowing as infrastructure constraints, and the shift towards liquid cooling.<\/p>\n<p class=\"wp-block-paragraph\">The hook ran once more, however this time it allowed Codex to complete. The end result is saved to outputs\/research_brief.json.<\/p>\n<h2 class=\"wp-block-heading\">3. When Hooks Are Helpful<\/h2>\n<p class=\"wp-block-paragraph\">In our case examine, we confirmed  use a Cease hook to validate a accomplished outcome. The identical design course of additionally applies to different lifecycle occasions.<\/p>\n<p class=\"wp-block-paragraph\">For SessionStart hook, it&#8217;s helpful when we have to load context when a session begins. If we have to examine an operation earlier than it occurs, we are able to use PreToolUse hook. If we wish to course of the results of a device name, we are able to use PostToolUse hook.<\/p>\n<p class=\"wp-block-paragraph\">When designing a hook, ask your self three questions:<\/p>\n<p>At which level within the lifecycle ought to it run?<\/p>\n<p>Below what situations ought to it run at that time?<\/p>\n<p>What motion ought to it execute?<\/p>\n<p class=\"wp-block-paragraph\">That is how one can add deterministic logic across the Codex execution.<\/p>\n<\/div>\n<p><br \/>\n<br \/><a href=\"https:\/\/towardsdatascience.com\/put-your-own-logic-inside-the-codex-agentic-loop\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>by way of prompts. We will describe the duty, give directions, and inform Codex what sort of outcome we count on. This enables us to regulate how the agent approaches its work. However generally, prompting just isn&#8217;t sufficient. We could wish to additional customise the execution by operating our personal logic at totally different phases [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg","fifu_image_alt":"","jnews-multi-image_gallery":[],"jnews_single_post":[],"jnews_primary_category":[],"jnews_override_bookmark_settings":[],"jnews_social_meta":[],"jnews_override_counter":[],"footnotes":""},"categories":[7],"tags":[15,3917,274,1447,4440],"class_list":["post-4208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science-mlops","tag-agentic","tag-codex","tag-logic","tag-loop","tag-put"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Put Your Personal Logic Contained in the Codex Agentic Loop - Future News 24<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Put Your Personal Logic Contained in the Codex Agentic Loop - Future News 24\" \/>\n<meta property=\"og:description\" content=\"by way of prompts. We will describe the duty, give directions, and inform Codex what sort of outcome we count on. This enables us to regulate how the agent approaches its work. However generally, prompting just isn&#8217;t sufficient. We could wish to additional customise the execution by operating our personal logic at totally different phases [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/\" \/>\n<meta property=\"og:site_name\" content=\"Future News 24\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-24T18:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-25T06:59:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg\" \/>\n<meta name=\"author\" content=\"Future News 24\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Future News 24\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/\"},\"author\":{\"name\":\"Future News 24\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/person\\\/cecad1bde21cfc357cf70128144d6c83\"},\"headline\":\"Put Your Personal Logic Contained in the Codex Agentic Loop\",\"datePublished\":\"2026-08-24T18:00:00+00:00\",\"dateModified\":\"2026-08-25T06:59:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/\"},\"wordCount\":1574,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/towardsdatascience.com\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/Codex_hooks.jpg\",\"keywords\":[\"Agentic\",\"Codex\",\"Logic\",\"loop\",\"Put\"],\"articleSection\":[\"Data Science &amp; MLOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/\",\"name\":\"Put Your Personal Logic Contained in the Codex Agentic Loop - Future News 24\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/towardsdatascience.com\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/Codex_hooks.jpg\",\"datePublished\":\"2026-08-24T18:00:00+00:00\",\"dateModified\":\"2026-08-25T06:59:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#primaryimage\",\"url\":\"https:\\\/\\\/towardsdatascience.com\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/Codex_hooks.jpg\",\"contentUrl\":\"https:\\\/\\\/towardsdatascience.com\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/Codex_hooks.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/08\\\/24\\\/put-your-own-logic-inside-the-codex-agentic-loop\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/futurenews24.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Put Your Personal Logic Contained in the Codex Agentic Loop\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#website\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/\",\"name\":\"Future News 24\",\"description\":\"The Smart Hub for AI and Next-Gen Innovation\",\"publisher\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/futurenews24.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#organization\",\"name\":\"Future News 24\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/fn24-favicon.png\",\"contentUrl\":\"https:\\\/\\\/futurenews24.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/fn24-favicon.png\",\"width\":250,\"height\":250,\"caption\":\"Future News 24\"},\"image\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/person\\\/cecad1bde21cfc357cf70128144d6c83\",\"name\":\"Future News 24\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g\",\"caption\":\"Future News 24\"},\"sameAs\":[\"https:\\\/\\\/futurenews24.com\"],\"url\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/author\\\/mridulpahuja20\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Put Your Personal Logic Contained in the Codex Agentic Loop - Future News 24","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/","og_locale":"en_US","og_type":"article","og_title":"Put Your Personal Logic Contained in the Codex Agentic Loop - Future News 24","og_description":"by way of prompts. We will describe the duty, give directions, and inform Codex what sort of outcome we count on. This enables us to regulate how the agent approaches its work. However generally, prompting just isn&#8217;t sufficient. We could wish to additional customise the execution by operating our personal logic at totally different phases [&hellip;]","og_url":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/","og_site_name":"Future News 24","article_published_time":"2026-08-24T18:00:00+00:00","article_modified_time":"2026-08-25T06:59:08+00:00","og_image":[{"url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg","type":"","width":"","height":""}],"author":"Future News 24","twitter_card":"summary_large_image","twitter_image":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg","twitter_misc":{"Written by":"Future News 24","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#article","isPartOf":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/"},"author":{"name":"Future News 24","@id":"https:\/\/futurenews24.com\/#\/schema\/person\/cecad1bde21cfc357cf70128144d6c83"},"headline":"Put Your Personal Logic Contained in the Codex Agentic Loop","datePublished":"2026-08-24T18:00:00+00:00","dateModified":"2026-08-25T06:59:08+00:00","mainEntityOfPage":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/"},"wordCount":1574,"commentCount":0,"publisher":{"@id":"https:\/\/futurenews24.com\/#organization"},"image":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg","keywords":["Agentic","Codex","Logic","loop","Put"],"articleSection":["Data Science &amp; MLOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/","url":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/","name":"Put Your Personal Logic Contained in the Codex Agentic Loop - Future News 24","isPartOf":{"@id":"https:\/\/futurenews24.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#primaryimage"},"image":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg","datePublished":"2026-08-24T18:00:00+00:00","dateModified":"2026-08-25T06:59:08+00:00","breadcrumb":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#primaryimage","url":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg","contentUrl":"https:\/\/towardsdatascience.com\/wp-content\/uploads\/2026\/08\/Codex_hooks.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/futurenews24.com\/index.php\/2026\/08\/24\/put-your-own-logic-inside-the-codex-agentic-loop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/futurenews24.com\/"},{"@type":"ListItem","position":2,"name":"Put Your Personal Logic Contained in the Codex Agentic Loop"}]},{"@type":"WebSite","@id":"https:\/\/futurenews24.com\/#website","url":"https:\/\/futurenews24.com\/","name":"Future News 24","description":"The Smart Hub for AI and Next-Gen Innovation","publisher":{"@id":"https:\/\/futurenews24.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/futurenews24.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/futurenews24.com\/#organization","name":"Future News 24","url":"https:\/\/futurenews24.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/futurenews24.com\/#\/schema\/logo\/image\/","url":"https:\/\/futurenews24.com\/wp-content\/uploads\/2026\/06\/fn24-favicon.png","contentUrl":"https:\/\/futurenews24.com\/wp-content\/uploads\/2026\/06\/fn24-favicon.png","width":250,"height":250,"caption":"Future News 24"},"image":{"@id":"https:\/\/futurenews24.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/futurenews24.com\/#\/schema\/person\/cecad1bde21cfc357cf70128144d6c83","name":"Future News 24","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g","caption":"Future News 24"},"sameAs":["https:\/\/futurenews24.com"],"url":"https:\/\/futurenews24.com\/index.php\/author\/mridulpahuja20\/"}]}},"_links":{"self":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts\/4208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/comments?post=4208"}],"version-history":[{"count":1,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts\/4208\/revisions"}],"predecessor-version":[{"id":4209,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts\/4208\/revisions\/4209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/media\/4210"}],"wp:attachment":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/media?parent=4208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/categories?post=4208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/tags?post=4208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}