Artificial Intelligence

Codex Now Tackles Long Tasks With New 'Goals' Feature

Codex introduces a powerful new 'Goals' feature, allowing developers to set long-term, persistent objectives for the AI to work towards.

StartupHub.ai Staff

By StartupHub.ai Staff, reviewed by Daniel Singer, Editor

3 min read

Contents(3)

In a significant update for developers looking to offload complex or time-consuming tasks, Codex has unveiled a new 'Goals' functionality. This feature allows users to set persistent objectives for Codex, enabling it to work autonomously towards achieving them over extended periods, potentially spanning hours or even days.

The 'Goals' feature integrates seamlessly into both the Codex application and its command-line interface (CLI), offering developers a versatile tool for managing intricate projects. Once a goal is defined, Codex will dedicate its processing power to achieving it, only ceasing when the objective is met or if the user chooses to pause or modify the task.

The full discussion can be found on OpenAI Youtube's YouTube channel.

Run long tasks in Codex using goals - OpenAI Youtube
Run long tasks in Codex using goals, from OpenAI Youtube

Defining and Pursuing Goals

The process for utilizing the 'Goals' feature begins by typing `/goal` in the message composer, which activates the goal-setting mode. From there, users can articulate their desired outcome. The system demonstrates this by showing an example of migrating a JavaScript codebase to TypeScript. The goal specifies that the application should compile in strict mode without explicit 'any' type definitions, and the codebase should be split into multiple files for easier maintenance. A subsequent refinement suggests translating tests to TypeScript using Vitest.

The video illustrates how Codex can handle goals with measurable targets. For instance, a goal might be to reduce the time to interactive of a homepage to below one second, requiring clear test criteria to be met. If users find it challenging to articulate their goals precisely, Codex can assist by first planning the implementation or by interviewing the user to gather more detailed requirements before formalizing the goal.

Flexibility and Control

Codex offers robust control over these long-running tasks. Users can pause a pursuing goal, allowing them to step away or switch to other work, and then resume it later. This is particularly useful when a developer needs to disconnect or if their internet connection is unstable. The ability to edit a goal is also present, allowing users to refine their objectives or provide more specific guidance as the task progresses.

The system also provides transparency into the progress of these goals. As Codex works, it logs its actions, such as the files being modified, the commands being run, and any generated code or tests. This detailed feedback loop allows users to monitor the progress, understand the decisions being made by Codex, and intervene if necessary. For example, the video shows Codex migrating a codebase, creating new files, and running test suites, all while keeping the user informed.

Applications and Implications

The implications of this 'Goals' feature are substantial for software development workflows. It can automate large-scale refactoring, complex data migrations, extensive code reviews, and even long-term research or experimentation tasks. The ability to set a goal and let Codex work on it for hours or days frees up developers to focus on higher-level problem-solving and creative work. The video highlights that Codex has successfully handled tasks requiring over 100 hours of work on a single goal, demonstrating its capacity for sustained, complex operations.

This advancement signifies a move towards more autonomous AI agents in software development. By allowing users to define high-level objectives and letting Codex manage the granular steps, the tool promises to significantly boost productivity and accelerate development cycles.

Mentioned in this story

TopicsCodexArtificial IntelligenceDeveloper ToolsProgramming

StartupHub.ai StaffDaniel SingerWritten by StartupHub.ai Staff, Editorial teamReviewed by Daniel Singer, EditorAbout

StartupHub.ai Staff, Editorial team

The staff writers of StartupHub.ai, ranging from investment analysts to avid AI tool users, early adopters and critical enthusiasts. Backgrounds span engineering, business and the arts. We hold every piece to rigorous standards of research and review.

Daniel Singer, Editor

Daniel Singer is an AI expert who has been writing about, covering and building AI technology since 2018.

More from Daniel Singer

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute.

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.