remotion-dev/remotion · error

Sequence cannot be selected.

Error message

Sequence ${sequenceId} cannot be selected.

What it means

The Studio WebMcp tool for selecting a sequence resolves the given sequenceId to a timeline selection via getTimelineSelectionFromNodePathInfo. When that returns null, the id does not map to a selectable timeline node, and the tool throws instead of selecting nothing silently.

Solutions

  1. Verify the sequenceId exists in the currently opened composition (list compositions/sequences first).
  2. Wait for the timeline to finish loading before invoking the selection tool.
  3. Re-fetch current sequence ids after hot reload or composition switch.
  4. Select a parent composition first if the sequence is nested and only reachable through it.

Example fix

// before
await selectSequence('my-old-sequence'); // throws
// after
const seqs = await listSequences();
if (seqs.includes('my-old-sequence')) await selectSequence('my-old-sequence');
Defensive patterns

Strategy: validation

Validate before calling

const known = new Set(getCurrentCompositionSequences().map((s) => s.id));
if (!known.has(sequenceId)) throw new Error(`Unknown sequence: ${sequenceId}`);

Type guard

null

Try / catch

try {
  await webmcp.selectSequence(sequenceId);
} catch (err) {
  if (err.message.includes('cannot be selected')) {
    // re-list sequences and pick a valid id
  }
}

Prevention

When it happens

Trigger: Calling the WebMcp select-sequence tool with a sequenceId that has no corresponding track/nodePathInfo in the current timeline — e.g. the sequence is not in the current composition, was deleted, or the id is stale/misspelled.

Common situations: Agents or automation driving Remotion Studio via WebMcp referencing sequences from a different composition; a hot reload changed sequence ids; selecting before the timeline tracks are loaded.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

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

						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.`);
						}

						timelineSelectionRef.current.selectItems([selection], {
							reveal: true,
						});
						return Promise.resolve({
							currentContent: currentContentRef.current,
							selectedSequence: serializeSequence(timelineTrack),
						});
					},
				},
				{signal: controller.signal},
			),
			modelContext.registerTool(
				{
					name: 'get_composition',
					title: 'Get Studio composition',
					description:

View on GitHub (pinned to 46a3a6bf13)