Default config in AgentLoop constructor missing required 'notify' property from AppConfig type

Resolved 💬 0 comments Opened Apr 24, 2025 by shosseini811 Closed Apr 24, 2025

What version of Codex is running?

0.1.2504181820

Which model were you using?

default

What platform is your computer?

Darwin 24.5.0 arm64 arm

What steps can reproduce the bug?

NA

What is the expected behavior?

NA

What do you see instead?

NA

Additional information

I noticed something that confused me in the AgentLoop constructor and wanted to ask about it.

In src/utils/agent/agent-loop.ts, when creating a default config, the code does:

this.config =
config ??
({
model,
instructions: instructions ?? "",
} as AppConfig);

But when I look at the AppConfig type definition in src/utils/config.ts, it shows that notify is a required property:

export type AppConfig = {
apiKey?: string;
model: string;
instructions: string;
// ... other optional properties ...
notify: boolean; // This is required (no ? mark)
// ... more optional properties ...
};

I'm confused because the default config object doesn't include the required notify property, but TypeScript doesn't show an error because of the as AppConfig type assertion.

!Image

View original on GitHub ↗