Agent Building
Advanced
Always open

Self-Improving GPT-5.3-Codex Agent for Code Generation & Refinement

Build a self-improving agent using the OpenAI Agents SDK, leveraging GPT-5.3-Codex's advanced code generation and reasoning capabilities. Inspired by OpenAI's claim of a model instrumental in creating itself, this challenge focuses on an agent that can autonomously generate code solutions for a given problem, then critically evaluate, test, and iteratively refine its own code to improve correctness, efficiency, and adherence to specified coding standards. The system should manage longer-running tasks, potentially involving multiple stages of generation, testing, and debugging, with robust observability and evaluation.

Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a self-improving agent using the OpenAI Agents SDK, leveraging GPT-5.3-Codex's advanced code generation and reasoning capabilities. Inspired by OpenAI's claim of a model instrumental in creating itself, this challenge focuses on an agent that can autonomously generate code solutions for a given problem, then critically evaluate, test, and iteratively refine its own code to improve correctness, efficiency, and adherence to specified coding standards. The system should manage longer-running tasks, potentially involving multiple stages of generation, testing, and debugging, with robust observability and evaluation.

Datasets

Shared data for this challenge

Review public datasets and any private uploads tied to your build.

Loading datasets...
Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks, how much each dimension matters, and which criteria separate a passable run from a strong one.

Max Score: 5
Dimensions
5 scoring checks
Binary
5 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1all_tests_pass

All Tests Pass

Verify that all provided unit tests pass with the final generated code.

binary
Weight: 1
Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2code_syntax_check

Code Syntax Check

Ensure the final_code is syntactically valid Python.

binary
Weight: 1
Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 3test_pass_rate

Test Pass Rate

Percentage of unit tests that passed with the final code. • target: 1 • range: 0-1

binary
Weight: 1
Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 4efficiency_iterations

Efficiency (Iterations)

Number of iterations taken to reach a working solution (lower is better). • target: 2 • range: 1-5

binary
Weight: 1
Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 5code_quality_score

Code Quality Score

A static analysis score (e.g., using Pylint or Flake8) for the final code. • target: 8 • range: 0-10

binary
Weight: 1
Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

Master the OpenAI Agents SDK for defining agent roles, tools, memory, and orchestrating complex, multi-turn interactions for code development.

Implement advanced prompt engineering for GPT-5.3-Codex to generate functional, robust, and idiomatic code for diverse programming problems.

Design an iterative self-improvement loop where the agent uses `DeepEval` to evaluate its generated code against unit tests and style guides, then uses that feedback to refine its own prompts or code.

Orchestrate the entire code generation, testing, and refinement pipeline using Dagster, ensuring each step (e.g., generate, test, debug, refine) is a managed operation.

Integrate Agent Protocol for standardized communication with an external 'Execution Environment' agent that runs generated code and returns test results.

Build a Gradio web interface for submitting coding challenges, displaying the agent's generated code, test outputs, and iterative refinements in real-time.

Develop strategies for managing persistent context and memory within the OpenAI Agents SDK to enable the agent to 'remember' previous attempts, errors, and successful patterns.

Start from your terminal
$npx -y @versalist/cli start self-improving-gpt-5-3-codex-agent-for-code-generation-refinement

[ok] Wrote CHALLENGE.md

[ok] Wrote .versalist.json

[ok] Wrote eval/examples.json

Requires VERSALIST_API_KEY. Works with any MCP-aware editor.

Docs
Manage API keys
Challenge at a glance
Host and timing
Vera

AI Research & Mentorship

Starts Available now
Evergreen challenge
Your progress

Participation status

You haven't started this challenge yet

Timeline and host

Operating window

Key dates and the organization behind this challenge.

Start date
Available now
Run mode
Evergreen challenge
Explore

Find another challenge

Jump to a random challenge when you want a fresh benchmark or a different problem space.

Useful when you want to pressure-test your workflow on a new dataset, new constraints, or a new evaluation rubric.

Tool Space Recipe

Draft
Evaluation
Rubric: 5 dimensions
·All Tests Pass(1%)
·Code Syntax Check(1%)
·Test Pass Rate(1%)
·Efficiency (Iterations)(1%)
·Code Quality Score(1%)
Gold items: 1 (1 public)

Frequently Asked Questions about Self-Improving GPT-5.3-Codex Agent for Code Generation & Refinement