Hmbown/CodeWhale · error
agent profile {} may not request trust=true
Error message
agent profile {} may not request trust=true What it means
Agent profile files may not request permissions.trust = true. Trust marks content or outputs as trusted and is a privileged grant; allowing profiles to self-declare it would let any worker escalate, so the loader rejects the file. Absent flags default to false and are accepted.
Source
Thrown at crates/tui/src/fleet/profile.rs:448
{
match posture {
"read-only" | "readonly" | "read_only" => {}
other => bail!(
"agent profile {} tools.posture={other:?} would widen permissions; use FleetProfile policy for grants",
path.display()
),
}
}
if let Some(permissions) = permissions {
if permissions.allow_shell.unwrap_or(false) {
bail!(
"agent profile {} may not request allow_shell=true",
path.display()
);
}
if permissions.trust.unwrap_or(false) {
bail!(
"agent profile {} may not request trust=true",
path.display()
);
}
if permissions.approval_required == Some(false) {
bail!(
"agent profile {} may not disable approval_required",
path.display()
);
}
}
Ok(())
}
fn validate_agent_profile_token(path: &Path, field: &str, value: &str) -> Result<()> {
let trimmed = value.trim();
if trimmed.is_empty() {
bail!("agent profile {} {field} cannot be empty", path.display());View on GitHub (pinned to 0c42157ee5)
Solutions
- Remove trust (or set it to false) from the profile's [permissions] block
- Configure trust centrally in the FleetProfile policy if and only where required
- Keep approval_required enabled for profiles that operate on untrusted input
Example fix
# before [permissions] trust = true # after [permissions] trust = false
Defensive patterns
Strategy: validation
Validate before calling
fn profile_permissions_ok(permissions: &Option<AgentProfilePermissionsToml>) -> bool {
permissions
.as_ref()
.map(|p| !p.trust.unwrap_or(false))
.unwrap_or(true)
} Try / catch
if let Err(err) = load_agent_profile_file(&path) {
if err.to_string().contains("trust=true") {
eprintln!("remove trust from the profile; configure trust centrally via FleetProfile policy");
}
return Err(err.into());
} Prevention
- Treat trust as a centrally managed grant, never a profile-level convenience
- Keep approval_required enabled for profiles handling untrusted input
- Grep profile directories for trust/allow_shell before shipping config changes
When it happens
Trigger: An agent profile TOML containing [permissions] trust = true.
Common situations: Attempting to suppress approval prompts by marking a profile trusted; porting profiles from tooling where trust was per-agent; misunderstanding trust as a benign convenience flag.
Related errors
- agent profile {} may not request allow_shell=true
- agent profile {} tools.posture={other:?} would widen permiss
- duplicate agent profile id {}
- agent profile path {} is not a directory
- persistent allow rules must be scoped to a workspace
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/5aecbd83e00de8e5.
Report an issue: GitHub.