BoundaryML/baml · error
unknown feedback field(s) {}; only "title" and "description"
Error message
unknown feedback field(s) {}; only "title" and "description" are sent (attach files with --files) What it means
The `baml feedback` command only transmits "title" and "description" fields to PostHog; any other keys in a --json payload are rejected so nothing is silently dropped. The error lists the offending key names and suggests attaching files with --files instead.
Source
Thrown at baml_language/crates/baml_cli/src/feedback_command.rs:389
if let Some(value) = flag {
obj.insert(key.to_string(), Value::String(value.clone()));
}
}
// Whitelist: only the documented fields ship. Anything else in a
// piped payload (stray script fields, PostHog-special keys like
// `$set`) is rejected rather than silently transmitted. `files` is
// deliberately NOT accepted from JSON: a piped payload naming local
// paths would let untrusted payload content exfiltrate arbitrary
// files. Attachments come only from the `--files` flag (trusted CLI
// input).
let unknown: Vec<&str> = obj
.keys()
.map(String::as_str)
.filter(|k| !matches!(*k, "title" | "description"))
.collect();
if !unknown.is_empty() {
return Err(anyhow::anyhow!(
"unknown feedback field(s) {}; only \"title\" and \
\"description\" are sent (attach files with --files)",
unknown.join(", ")
));
}
// Validate types, not just names: a non-string field would ship to
// PostHog while the preview and the local record (which read via
// `as_str`) silently dropped it.
for key in ["title", "description"] {
if let Some(value) = obj.get(key)
&& !value.is_string()
{
return Err(anyhow::anyhow!("feedback field \"{key}\" must be a string"));
}
}
let title = obj.get("title").and_then(Value::as_str).unwrap_or("");View on GitHub (pinned to bd85ce9dee)
Solutions
- Remove non-title/description keys from the --json payload, or rename them into the description text.
- Use --files to attach logs/screenshots instead of embedding them as JSON fields.
- Check key spelling and case: only lowercase "title" and "description" are accepted.
Example fix
// before
baml feedback --json '{"title":"bug","email":"me@x.com"}'
// after
baml feedback --json '{"title":"bug","description":"see attached"}' --files log.txt Defensive patterns
Strategy: validation
Validate before calling
# allow only known keys before invoking jq -e 'keys - ["title","description"] | length == 0' payload.json \ && baml feedback --json "$(cat payload.json)" \ || echo "payload has unsupported keys"
Try / catch
try {
run(`baml feedback --json '${payload}'`);
} catch (e) {
if (String(e).includes('unknown feedback field')) {
const clean = (({ title, description }) => ({ title, description }))(JSON.parse(payload));
run(`baml feedback --json '${JSON.stringify(clean)}'`);
}
} Prevention
- Restrict feedback JSON payloads to title and description keys
- Use --files for attachments instead of extra JSON fields
- Use exact lowercase key names
When it happens
Trigger: Running `baml feedback --json '{...}'` where the JSON object contains keys other than title/description (e.g. "email", "logs", "body").
Common situations: Reusing a generic feedback JSON template with extra fields; trying to attach log contents inline as a JSON field instead of using --files; typos like "titel" or "Title" (case mismatch).
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- feedback field "{key}" must be a string
- feedback needs a title; pass --title "..." or a JSON payload
- feedback payload must be a JSON object like {"title": "..."}
- invalid Go SDK import path `{import_path}`
- project name cannot be empty
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/e85c0a63a01ce8ce.
Report an issue: GitHub.