remotion-dev/remotion · error

Studio sequence selection is unavailable.

Error message

Studio sequence selection is unavailable.

What it means

Thrown by the WebMcp select_sequence tool's execute handler: this is an environment-state guard, not an input validation. The handler checks timelineSelectionRef.current.canSelect before attempting to locate and select the sequence; when selection is disabled in the current Studio state (e.g. the timeline cannot accept a selection change, such as when the Studio is not in an interactive state that permits selecting timeline items), the MCP tool call cannot proceed. It tells the MCP client that the requested selection action is unavailable in the current Studio session, not that the sequenceId was wrong.

Solutions

  1. Use the MCP timeline listing to get valid sequence ids for the current composition
  2. Add explicit id props to your <Sequence> components and use those exact strings
  3. Verify the id is from the currently selected composition, not another one
Defensive patterns

Strategy: try-catch

Validate before calling

const ids = getCurrentTimeline().map((t) => t.sequence.id);
if (!ids.includes(sequenceId)) { /* pick from ids */ }

Try / catch

catch (e) { if (e.message.includes('not found in the current composition')) { /* re-list timeline ids and retry with a valid one */ } }

Prevention

When it happens

Trigger: Calling selectSequence with a typo'd id, an id from a different composition, or an id of a sequence not currently rendered in the timeline.

Common situations: Stale ids after renaming <Sequence id>, sequences nested inside compositions that are not the selected one, or hidden/collapsed tracks that are still addressable but with different ids.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18). Data as JSON: /api/errors/23dbda701bc8da6f. Report an issue: GitHub.

Appendix: source

Thrown at packages/studio/src/components/WebMcp.tsx:981

								description: 'The sequence ID returned by get_sequences.',
							},
						},
						required: ['sequenceId'],
						additionalProperties: false,
					},
					annotations: {readOnlyHint: false},
					execute: ({sequenceId}) => {
						if (typeof sequenceId !== 'string' || sequenceId.length === 0) {
							throw new Error('sequenceId must be a non-empty string.');
						}

						const compositionId = currentCompositionRef.current;
						if (compositionId === null) {
							throw new Error('No composition is currently selected.');
						}

						if (!timelineSelectionRef.current.canSelect) {
							throw new Error('Studio sequence selection is unavailable.');
						}

						const timelineTrack = getCurrentTimeline().find(
							(candidate) => candidate.sequence.id === sequenceId,
						);
						if (!timelineTrack) {
							throw new Error(
								`Sequence ${sequenceId} not found in the current composition.`,
							);
						}

						const selection = getTimelineSelectionFromNodePathInfo(
							timelineTrack.nodePathInfo,
						);
						if (selection === null) {
							throw new Error(`Sequence ${sequenceId} cannot be selected.`);
						}

View on GitHub (pinned to 46a3a6bf13)