warpdotdev/warp · error · anyhow::Error
--subject-template requires at least one value
Error message
--subject-template requires at least one value
What it means
Error "--subject-template requires at least one value" thrown in warpdotdev/warp.
Source
Thrown at app/src/ai/agent_sdk/federate.rs:43
match command {
FederateCommand::IssueToken(args) => issue_token(ctx, args, global_options.output_format),
FederateCommand::IssueGcpToken(args) => issue_gcp_token(ctx, args),
}
}
fn issue_token(
ctx: &mut AppContext,
args: IssueTokenArgs,
output_format: OutputFormat,
) -> Result<()> {
// Set the task ID so the ambient agent workload token header is sent.
set_ambient_task_context_from_run_id(ctx, &args.run_id)?;
let duration: std::time::Duration = args.duration.into();
let audience = args.audience;
let subject_template = match args.subject_template {
Some(template) => vec1::Vec1::try_from_vec(template)
.map_err(|_| anyhow::anyhow!("--subject-template requires at least one value"))?,
None => vec1::vec1!["principal".to_owned()],
};
ManagedSecretManager::handle(ctx).update(ctx, move |manager, ctx| {
let future =
manager.issue_task_identity_token(warp_managed_secrets::client::IdentityTokenOptions {
audience,
requested_duration: duration,
subject_template,
});
ctx.spawn(future, move |_, result, ctx| match result {
Ok(token) => {
let token_value = token.token;
let expires_at = token.expires_at.to_rfc3339();
let issuer = token.issuer;
match output_format {
OutputFormat::Json | OutputFormat::Ndjson => {
let output = json!({View on GitHub (pinned to e72fd7aacb)
When it happens
Trigger: Thrown at app/src/ai/agent_sdk/federate.rs:43 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/6c46396f09244acf.
Report an issue: GitHub.