fleet/docs/Configuration
Adam Baali e62f451e9d
Fix command_line_flags placement in agent configuration docs (#39546)
## Changes

Fixes incorrect YAML example in
`docs/Configuration/agent-configuration.md` where `command_line_flags`
was shown nested under `config:` instead of at the top level.

**File changed:** `docs/Configuration/agent-configuration.md`

## What was wrong

The example in the `## config` section showed `command_line_flags`
indented under `config:`:

```yaml
config:
  options:
    distributed_interval: 3
    ...
  command_line_flags: #  WRONG - nested under config
    verbose: true
    ...
  decorators:
    ...
```

This is incorrect and causes the following error when applied via
`fleetctl apply` for team YAML files:

```
Error: applying teams: POST /api/latest/fleet/spec/teams received status 400 Bad Request: 
"command_line_flags" should be part of the top level object
```

## Correct placement

Per the original implementation in
[#7377](https://github.com/fleetdm/fleet/issues/7377),
`command_line_flags` must be a **top-level key** under `agent_options`,
at the same level as `config:`:

```yaml
config:
  options:
    distributed_interval: 3
    ...
  decorators:
    ...
  yara:
    ...
command_line_flags: #  CORRECT - top level, sibling of config
  verbose: true
  ...
```

This is consistent with:
- The [Configuration files
docs](https://fleetdm.com/docs/configuration/configuration-files) which
correctly show `command_line_flags: {}` at the top level
- Issue #7377 which states: *"The overrides setting does not accommodate
command_line_flags, which is why it is only allowed at the top-level
(and not inside config or every override)"*
- The overrides section of the same page which notes: *"the
command_line_flags key is not supported in the overrides"*

## Related issues
- Closes: https://github.com/fleetdm/confidential/issues/14206
- Closes: https://github.com/fleetdm/confidential/issues/14207

---------

Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2026-02-09 12:16:31 -06:00
..
agent-configuration.md Fix command_line_flags placement in agent configuration docs (#39546) 2026-02-09 12:16:31 -06:00
fleet-server-configuration.md Preview of v4.80.0 doc changes (#37193) 2026-02-02 17:41:37 -06:00
README.md Fix links in Configuration README (#35538) 2025-11-24 17:11:16 -06:00
yaml-files.md GitOps reference: No label_membership_type (#39556) 2026-02-09 11:25:44 -06:00

Configuration

Fleet server

Fleet server configuration

Documentation for configuring the Fleet binary, managing osquery configurations, and running with systemd.

Agent

Agent configuration

Learn how to set agent options with config YAML file and the fleetctl command line tool.