Codex CLI Overview and Analysis of agent-loop.ts Agent Loop

Content may be unverified or unsafe. Report
ChatGPTChatGPT
Citations

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1512-L1520

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1525-L1528

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1517-L1524

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/examples/prompting_guide.md#L26-L34

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/examples/prompting_guide.md#L36-L45

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/examples/prompting_guide.md#L77-L84

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L462-L470

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L466-L475

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L476-L484

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L506-L515

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L516-L524

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L500-L505

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L557-L565

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L569-L574

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L620-L629

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L633-L642

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L576-L579

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L667-L675

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L685-L693

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L605-L614

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L607-L615

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L632-L640

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L705-L713

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L739-L745

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L724-L732

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L733-L741

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L767-L775

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L777-L785

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L783-L791

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L801-L809

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L833-L841

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L864-L873

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1441-L1449

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L953-L961

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L961-L969

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L967-L975

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L980-L988

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L985-L993

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L987-L995

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L991-L1000

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L995-L1003

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1483-L1491

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1495-L1503

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L370-L378

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L388-L396

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L426-L434

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L440-L446

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L392-L400

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L404-L412

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1496-L1504

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1499-L1507

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1051-L1058

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L667-L676

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1020-L1028

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1030-L1038

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1207-L1216

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1266-L1274

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1213-L1219

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1255-L1263

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1220-L1228

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L197-L205

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L199-L201

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L920-L928

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L930-L938

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L349-L356

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L248-L256

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1144-L1153

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1154-L1163

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1162-L1170

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1172-L1181

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1182-L1190

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1281-L1289

https://github.com/openai/codex/blob/cfe50c7107b926c69f0774601909fa893bfe1055/codex-cli/src/utils/agent/agent-loop.ts#L1293-L1301
All Sources