affaan-m/ECC · error

checked task text

Error message

checked task text

What it means

An internal invariant assertion: the dispatch code calls body_text.expect("checked task text"), meaning earlier validation should have guaranteed the task body is present. If execution reaches here with body_text == None, the program panics with this message, signaling a bug in the preceding validation flow rather than user error.

Solutions

  1. Report/inspect why the earlier task-text validation was bypassed; ensure body_text is set for Standard dispatch before this match.
  2. Add a guard that validates task text before the match arm instead of relying on expect.
  3. If hit interactively, check the command that produced an empty/missing task body (e.g. piping empty stdin).

Example fix

// before
let body_text = draft.task_text.filter(|t| !t.trim().is_empty());
// later: body_text.expect("checked task text")
// after
let body_text = match draft.task_text {
    Some(t) if !t.trim().is_empty() => Some(t),
    _ => anyhow::bail!("task text is required for standard dispatch"),
};
Defensive patterns

Strategy: validation

Validate before calling

let body = draft.task_text.as_deref().map(str::trim).filter(|t| !t.is_empty());
anyhow::ensure!(body.is_some(), "task text required");

Try / catch

// treat any occurrence of this panic as a bug report:
std::panic::catch_unwind(|| dispatch_standard(...)).unwrap_or_else(|_| {
    eprintln!("internal error: task text validation skipped — please report");
});

Prevention

When it happens

Trigger: A code path where RemoteDispatchKind::Standard is selected but the task-text validation step that populates body_text was skipped or failed silently.

Common situations: Reaching this only after a developer adds a new dispatch path or reorders validation; users should never hit it directly, but a panic here means the earlier empty-task check didn't run.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/e9138743f3099b98. Report an issue: GitHub.

Appendix: source

Thrown at ecc2/src/main.rs:7223

                    report.requests.push(item);
                    continue;
                }
            },
            None => None,
        };

        report.ready_requests += 1;
        if dry_run {
            report.requests.push(item);
            continue;
        }

        let request = match draft.request_kind {
            session::RemoteDispatchKind::Standard => {
                session::manager::create_remote_dispatch_request(
                    db,
                    cfg,
                    body_text.expect("checked task text"),
                    target_session_id.as_deref(),
                    draft.priority.unwrap_or(TaskPriorityArg::Normal).into(),
                    draft.agent.as_deref().unwrap_or(&cfg.default_agent),
                    draft.profile.as_deref(),
                    draft.use_worktree.unwrap_or(cfg.auto_create_worktrees),
                    session::SessionGrouping {
                        project: draft.project.clone(),
                        task_group: draft.task_group.clone(),
                    },
                    "migrate_remote",
                    None,
                )?
            }
            session::RemoteDispatchKind::ComputerUse => {
                let defaults = cfg.computer_use_dispatch_defaults();
                session::manager::create_computer_use_remote_dispatch_request(
                    db,
                    cfg,

View on GitHub (pinned to 8321021c54)