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
- Wait for the attempt/session data to finish loading before enabling paste-upload (render the editor only once attempt.session exists).
- Check the network response for the attempt fetch and confirm the session object is included; fix the query/endpoint if session is missing.
- Show a visible UI message that image upload is unavailable for this attempt instead of silently dropping the file.
- 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
- Gate the retry editor (or its attachment features) on attempt.session being loaded.
- Ensure the attempts API response always includes the embedded session when available.
- Surface upload-skipped warnings in the UI rather than only logging to console.
- Refresh attempt data if the session appears missing after a retry.
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
- Profile key not found
- Machine client is required
- Selected profile key not found
- Machine client is required
- Action "${action.id}" requires a workspace target
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/5ec17c9fab117ef3.
Report an issue: GitHub.