bytedance/deer-flow · error · HTTPException
The source assistant message is missing an id
Error message
The source assistant message is missing an id
What it means
Error "The source assistant message is missing an id" thrown in bytedance/deer-flow.
Source
Thrown at backend/app/gateway/routers/thread_runs.py:747
latest_checkpoint_id = _checkpoint_configurable(latest_checkpoint).get("checkpoint_id")
if not latest_checkpoint_id:
raise HTTPException(status_code=404, detail=f"Thread {thread_id} has no checkpoint")
messages = _checkpoint_messages(latest_checkpoint)
if _has_active_goal(latest_checkpoint):
raise HTTPException(status_code=409, detail="Cannot edit while a goal is active")
_, source_human, _, source_ai, source_message_ids = _latest_editable_turn(messages, human_message_id)
source_text = get_original_user_content_text(_message_content(source_human), _message_additional_kwargs(source_human)).strip()
if normalized_text == source_text:
raise HTTPException(status_code=409, detail="Edited message is unchanged")
source_human_id = _message_id(source_human)
source_ai_id = _message_id(source_ai)
if not source_human_id:
raise HTTPException(status_code=409, detail="The source user message is missing an id")
if not source_ai_id:
raise HTTPException(status_code=409, detail="The source assistant message is missing an id")
base_checkpoint_tuple = await _find_base_checkpoint_before_human(
thread_id,
source_human_id,
request,
head_checkpoint=latest_checkpoint,
)
target_run_id = await _find_target_run_id(thread_id, source_ai_id, source_ai, source_human, request)
source_record = await _require_successful_source_run(thread_id, target_run_id, request)
checkpoint = _checkpoint_response(base_checkpoint_tuple)
replacement_human_message_id = str(uuid.uuid4())
source_metadata = getattr(source_record, "metadata", None) or {}
existing_group_id = source_metadata.get("edit_version_group_id") if isinstance(source_metadata, dict) else None
# Reserved for future edit-chain grouping across repeated edits of the same
# original prompt; current visibility still keys off regenerate_from_run_id.
edit_version_group_id = existing_group_id if isinstance(existing_group_id, str) and existing_group_id else source_human_id
metadata = {
"replay_kind": "edit",View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Reload the thread history; the assistant message may lack an id due to a corrupted checkpoint.
- If the checkpoint is damaged, start a new thread or branch from an earlier healthy checkpoint.
When it happens
Trigger: Thrown at backend/app/gateway/routers/thread_runs.py:747 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/7247260354ed217d.
Report an issue: GitHub.