OpenAI GPT Models
Relevant source files
The following files were used as context for generating this wiki page:
OpenAI GPT models, specifically GPT-4 and GPT-5, serve as the core intelligence engines for various agentic coding environments and CLI tools. These models are utilized to perform complex software engineering tasks, including code generation, multi-file refactoring, debugging, and architectural planning. They operate as autonomous agents capable of interacting with a local filesystem, executing terminal commands, and managing structured task lists to resolve user queries end-to-end.
In these systems, the models are integrated with specialized harnesses (such as Amp, Augment, or Codex CLI) that provide a context engine, a tool-calling interface, and safety guardrails. The models process high-level user intents and decompose them into actionable sequences of tool invocations, ensuring that the final output is verified through testing and linting before completion.
Sources: Amp/gpt-5.yaml, Augment Code/gpt-5-agent-prompts.txt:1-15, Cursor Prompts/Agent CLI Prompt 2025-08-07.txt:1-15, Open Source prompts/Codex CLI/openai-codex-cli-system-prompt-20250820.txt:1-15
Model Variants and Roles
The project documentation identifies multiple versions of GPT models and their specific implementations within different agent frameworks.
| Model Version | Application/Framework | Primary Role |
|---|---|---|
| GPT-5 | Amp / Augment / Cursor | Autonomous agent for multi-file implementations and heavy execution. |
| GPT-4 | Same.dev | Pair programming assistant for cloud-based web application development. |
| o3 (Reasoning) | Oracle (Amp) | Senior engineering advisor for architecture reviews and complex debugging. |
Sources: Amp/gpt-5.yaml:1-10, 246-260, Augment Code/gpt-5-agent-prompts.txt:10-15, Cursor Prompts/Agent CLI Prompt 2025-08-07.txt:1, Same.dev/Prompt.txt:5
GPT-5 Implementation (Amp/Augment)
GPT-5 is utilized for "heavy, multi-file implementations" and feature scaffolding. In the Amp framework, it is configured with a max_output_tokens limit of 32,000 to handle large-scale code generation and extensive reasoning cycles. It acts as a "fire-and-forget executor" for tasks that have been pre-planned by reasoning models.
Sources: Amp/gpt-5.yaml:246-258, 621, Augment Code/gpt-5-agent-prompts.txt:10-15
o3 Reasoning Model (The Oracle)
The o3 model is designated as the "Oracle," providing senior-level engineering guidance. Unlike the standard GPT-5 executor, o3 is optimized for deep reasoning, performance analysis, and planning task tool runs. It focuses on the "why" and "how" of architectural decisions rather than just writing the code.
Sources: Amp/gpt-5.yaml:262-274
System Architecture and Tool Interaction
The GPT models operate within a loop of discovery, planning, implementation, and verification. They do not merely generate text but interact with the environment through a defined set of tools.
The diagram above illustrates the autonomous agent loop where the GPT model handles the entire lifecycle of a software task.
Sources: Amp/gpt-5.yaml:25-50, Cursor Prompts/Agent CLI Prompt 2025-08-07.txt:50-65, Open Source prompts/Codex CLI/openai-codex-cli-system-prompt-20250820.txt:20-45
Parallel Execution Policy
To minimize latency, GPT-5 models are instructed to default to parallel execution for independent operations. This includes simultaneous file reads, diagnostics, and codebase searches. Serialization is reserved for strict dependencies, such as when a code edit depends on a finished plan or when multiple writes touch the same file.
Sources: Amp/gpt-5.yaml:65-95, Cursor Prompts/Agent CLI Prompt 2025-08-07.txt:100-120
Planning and Task Management
For non-trivial tasks, GPT models utilize a "Plan" or "Todo" tool. This provides the user with visibility into the model's progress and ensures complex tasks are decomposed into manageable steps.
Task Management workflow
- Trigger: Multi-file changes, user requests for planning, or tasks exceeding 5 iterations.
- Creation: An initial exploratory task (e.g., "Investigate the problem") is set to
IN_PROGRESS. - Refinement: After investigation, the model adds a minimal set of substantive tasks (usually 1-3).
- State Management: The model must batch updates to mark previous tasks as
completedand the next asin_progress.
Sources: Augment Code/gpt-5-agent-prompts.txt:30-45, 110-135, Open Source prompts/Codex CLI/openai-codex-cli-system-prompt-20250820.txt:50-80
Example Plan Structure (Codex CLI)
{
"steps": [
{"step": "Add CLI entry with file args", "status": "completed"},
{"step": "Parse Markdown via CommonMark", "status": "in_progress"},
{"step": "Apply semantic HTML template", "status": "pending"}
]
}
Sources: Open Source prompts/Codex CLI/openai-codex-cli-system-prompt-20250820.txt:90-105
Operational Guardrails
To ensure safety and technical accuracy, GPT models follow strict operational guidelines:
- Simple-first: Preference for local fixes over broad architectural changes.
- Reuse-first: Models must search for existing patterns and mirror naming conventions.
- No new dependencies: Models cannot add libraries without explicit user approval.
- Package Management: Models must use
npm,pip, orcargocommands instead of editingpackage.jsonorrequirements.txtdirectly to avoid version mismatches.
Sources: Amp/gpt-5.yaml:25-45, Augment Code/gpt-5-agent-prompts.txt:150-175, Same.dev/Prompt.txt:60-80
Verification and Quality Gates
Every code change implemented by a GPT model must pass through a verification gate. The standard sequence is:
- Typecheck: Verify static types (e.g.,
tscorgo build). - Lint: Ensure adherence to style guidelines (e.g.,
eslintorruff). - Tests: Execute unit and integration tests.
- Build: Confirm the entire project compiles.
Sources: Amp/gpt-5.yaml:318-330, Open Source prompts/Codex CLI/openai-codex-cli-system-prompt-20250820.txt:175-195
Code Style Requirements
GPT models are instructed to write "high-verbosity" code for human reviewers, following specific naming conventions:
- Functions must be verbs or verb-phrases.
- Variables must be nouns and avoid 1-2 character names.
- Avoid unsafe typecasts or the
anytype in statically typed languages.
Sources: Cursor Prompts/Agent CLI Prompt 2025-08-07.txt:160-185
Conclusion
OpenAI GPT models provide the autonomous logic required to navigate large codebases and implement software features. By combining the high-speed execution capabilities of GPT-5 with the deep reasoning of o3, these systems manage the complexity of software engineering while maintaining safety through parallel verification gates and structured planning tools.
Sources: Amp/gpt-5.yaml, Augment Code/gpt-5-agent-prompts.txt, Cursor Prompts/Agent CLI Prompt 2025-08-07.txt