BloopAI/vibe-kanban · warning

Skipping retry image upload: missing session id for attempt

Error message

Skipping retry image upload: missing session id for attempt

What it means

RetryEditorInline's paste/attach file handler uploads pasted images via attachmentsApi.uploadForAttempt, which requires a session id for the current attempt. When attempt.session is undefined (or has no id), the upload is skipped with this console warning and the pasted image is silently not attached to the retry message.

Source

Thrown at packages/web-core/src/shared/components/NormalizedConversation/RetryEditorInline.tsx:102

    message,
    processProfile,
    selectedVariant,
    executionProcessId,
    branchStatus,
    attemptData.processes,
  ]);

  const handleCmdEnter = useCallback(() => {
    if (canSend && !isSending) {
      onSend();
    }
  }, [canSend, isSending, onSend]);

  const handlePasteFiles = useCallback(
    async (files: File[]) => {
      const sessionId = attempt.session?.id;
      if (!sessionId) {
        console.warn(
          'Skipping retry image upload: missing session id for attempt',
          workspaceId
        );
        return;
      }

      for (const file of files) {
        try {
          const response = await attachmentsApi.uploadForAttempt(
            workspaceId,
            sessionId,
            file
          );
          const imageMarkdown = buildWorkspaceAttachmentMarkdown(response);
          setMessage((prev) =>
            prev ? `${prev}\n\n${imageMarkdown}` : imageMarkdown
          );
        } catch (error) {

View on GitHub (pinned to 4deb7eca8f)

Solutions

  1. Wait for the attempt/session data to finish loading before enabling paste-upload (render the editor only once attempt.session exists).
  2. Check the network response for the attempt fetch and confirm the session object is included; fix the query/endpoint if session is missing.
  3. Show a visible UI message that image upload is unavailable for this attempt instead of silently dropping the file.
  4. If the session was genuinely never created (execution failed before session creation), image upload cannot work — retry the task to create a session first.

Example fix

// before
const sessionId = attempt.session?.id;
if (!sessionId) { console.warn('Skipping retry image upload...'); return; }
// after
const sessionId = attempt.session?.id;
if (!sessionId) {
  setUploadError('Image upload unavailable: this attempt has no session yet.');
  return;
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (!attempt.session?.id) {
  // defer uploads until session data is available
  return;
}

Type guard

function hasSessionId(attempt: Attempt): attempt is Attempt & { session: { id: string } } {
  return typeof attempt.session?.id === 'string' && attempt.session.id.length > 0;
}

Try / catch

try {
  const res = await attachmentsApi.uploadForAttempt(workspaceId, sessionId, file);
} catch (error) {
  console.error('Failed to upload attachment:', error);
  setUploadError('Image upload failed; please try again.');
}

Prevention

When it happens

Trigger: User pastes or attaches files in the retry editor while attempt.session?.id is undefined — e.g. the attempt has no associated session yet, session data hasn't loaded, or the API returned an attempt without an embedded session.

Common situations: Opening the retry editor before the attempt/session query resolves; retrying an execution that never created a session (failed early); stale cached attempt data after a session was deleted; backend returning attempts without session included.

Related errors


AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29). Data as JSON: /api/errors/5ec17c9fab117ef3. Report an issue: GitHub.