bug(config): schema-unknown / misplaced keys are silently stripped instead of rejected — no load-time validation
Problem
AO's config loader silently drops keys that don't match the schema instead of rejecting them. A misplaced or misspelled key produces no error at ao start / ao spawn / ao doctor — the daemon runs with the intended setting silently absent, and you only discover it by observing wrong runtime behavior (a worker running with the wrong permissions or model). The config is individually well-documented (ao config-help), but nothing tells you when your file doesn't match it.
Concrete traps (verified against ao config-help, ao 0.8.0)
- Right key, wrong scope → silently stripped.
agentConfigis valid only underprojects.<id>.agentConfig. Butagent,runtime,workspace,notifiers,orchestrator,workerare all settable under top-leveldefaults, sodefaults.agentConfig:reads as a natural place to set a fleet-wide default permission/model. It isn't in thedefaultsschema — so it's dropped, and every project silently runs with default permissions/model. No warning. - Out-of-enum value → no early rejection.
agentConfig.permissionsacceptspermissionless | default | auto-edit | suggest. A plausible guess likepermissions: bypassis not in the enum; the intent is lost rather than flagged at load with the accepted set. - Same failure mode as the migration footguns in #2524 — config parsing that is lenient where it should be strict (unknown keys pass) — viewed from the schema-validation angle rather than the wrapped→flat-migration angle.
The likely mechanism is the loader using zod's default object behavior (unknown keys stripped) rather than surfacing them. A published schema/config.schema.json already exists (referenced in the $schema line ao config-help emits), so the raw material for a validate-on-load pass is already there.
Proposal
Validate the whole config against the schema at load time (ao start, ao doctor, and ideally ao config), and reject — or at minimum loudly warn with the offending path — on:
- Unknown keys (
.strict()or an explicit unknown-key diagnostic instead of a silent strip). - Known keys in the wrong scope (e.g.
agentConfigunderdefaults) — point at the scope that accepts it. - Out-of-enum values — print the accepted set (
permissions: got "bypass", expected one of permissionless|default|auto-edit|suggest).
ao doctor is the natural home for a non-fatal "your config has N keys the schema doesn't recognize — did you mean …" report even if start stays lenient for back-compat.
Repro
Add defaults: { agentConfig: { permissions: permissionless } } to a project's agent-orchestrator.yaml, start, and observe workers spawn with default (not permissionless) permissions and no diagnostic about the ignored key.
🤖 Filed with Claude Code on behalf of @Tonedeath
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @neversettle17-101
- @somewherelostt
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @neversettle17-101 and @somewherelostt here. You can also join the AO Discord if you want faster context, want to ask questions live, or just want to follow what the community is building.
You are also welcome to join the AO Discord community.
We do daily Discord calls at 10 PM IST, except Saturday.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
Assigned to @codebanditssss
Closing as it is obsolete after rewrite.