Pick a key that names what you wait for, like the order it belongs to.
step.wait returns the payload of the event that woke it.
A run can wait up to a year.
⌘I
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Nelkap","colors":{"primary":"#e17100","light":"#e17100","dark":"#e17100"},"logo":{"light":"https://mintcdn.com/holotus/RV7BD0r7AMXMDw7i/logo/light.svg?fit=max\u0026auto=format\u0026n=RV7BD0r7AMXMDw7i\u0026q=85\u0026s=f5f88593d5630ef81de534d6d052cc79","dark":"https://mintcdn.com/holotus/RV7BD0r7AMXMDw7i/logo/dark.svg?fit=max\u0026auto=format\u0026n=RV7BD0r7AMXMDw7i\u0026q=85\u0026s=75a0e94bf82364699a5381b24ddf3de8"},"favicon":"https://mintcdn.com/holotus/RV7BD0r7AMXMDw7i/favicon.svg?fit=max\u0026auto=format\u0026n=RV7BD0r7AMXMDw7i\u0026q=85\u0026s=be67a50bc4984f41f72e35edf31bfdc5","background":{"color":{"light":"#ffffff","dark":"#09090b"}},"navbar":{"links":[{"href":"https://nelkap.com/auth","label":"Sign in"}],"primary":{"type":"button","label":"Free trial","href":"https://nelkap.com/auth"}},"footer":{"socials":{"github":"https://github.com/nelkap-labs","linkedin":"https://www.linkedin.com/company/nelkap"}},"fonts":{"family":"Geist"},"styling":{"codeblocks":{"theme":{"light":"light-plus","dark":"dark-plus"}},"latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"holotus","hasAudioNarration":false,"actualSubdomain":"holotus","customDomains":["docs.nelkap.com"],"gitSource":{"type":"github","owner":"mintlify-community","repo":"docs-holotus-bbe6eacc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6adb74ae46b60ddf4f0a2659"},"chroma":{"latestBuiltDeploymentHistoryId":"6adba8edd93bf2851222eea0","collectionId":"dcffa334-84cf-4ddd-a267-bebdc40f3dba","liveDeploymentHistoryId":"6adba8edd93bf2851222eea0","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adbd4349cb78e91c8a882be","clientVersion":"0.0.3952","searchFilterCounts":[{"language":"default","tag":"Getting Started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"guides/pause","slug":"/guides/pause","pageMetadata":{"title":"Pause a run","description":"Sleep for a while, or wait for an event, for as long as it takes.","href":"/guides/pause"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Sleep for a while, or wait for an event, for as long as it takes.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`sleep`,children:`Sleep`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes light-plus dark-plus`,style:{backgroundColor:`#FFFFFF`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#000000`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#AF00DB`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:` nelkap`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`step`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:`sleep`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:`'3 days'`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A duration is a count and a unit: second, minute, hour, day, week, month, or year. It can go up to a year. Months and years follow the calendar.`}),`\n`,_jsx(Heading,{level:`2`,id:`wait-for-an-event`,children:`Wait for an event`}),`\n`,_jsx(_components.p,{children:`A run can hold until someone answers, however long it takes:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes light-plus dark-plus`,style:{backgroundColor:`#FFFFFF`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#000000`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#AF00DB`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:` refundOrder`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#267F99`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#AF00DB`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:` nelkap`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`step`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:`'approval request'`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:` askManager`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0070C1`,\"--shiki-dark\":`#4FC1FF`},children:` review`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#AF00DB`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:` nelkap`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`step`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:`wait`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c{ `}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`approved`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#267F99`,\"--shiki-dark\":`#4EC9B0`},children:`boolean`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:` }>(`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:\"`refund_\"}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#AF00DB`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`review`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`approved`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#AF00DB`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:` nelkap`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`step`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:`'refund'`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:` refund`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When the manager answers, emit an event with the same key:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes light-plus dark-plus`,style:{backgroundColor:`#FFFFFF`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#000000`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#AF00DB`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:` nelkap`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#795E26`,\"--shiki-dark\":`#DCDCAA`},children:`emit`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`event:`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:` 'refund.reviewed'`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`payload:`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`approved:`}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`wakeOn:`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:\" `refund_\"}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#001080`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#0000FF`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#A31515`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#000000`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Pick a key that names what you wait for, like the order it belongs to.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`step.wait`}),` returns the payload of the event that woke it.`]}),`\n`,_jsx(_components.li,{children:`A run can wait up to a year.`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"light-plus","dark":"dark-plus"}},"config":{},"pageMetadata":{"title":"Pause a run","description":"Sleep for a while, or wait for an event, for as long as it takes.","href":"/guides/pause"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Sleep","slug":"sleep","depth":2,"children":[]},{"title":"Wait for an event","slug":"wait-for-an-event","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"holotus","siteName":"Nelkap","title":"Pause a run - Nelkap","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T21:40:07.500Z","originalFileLocation":"guides/pause.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Sleep for a while, or wait for an event, for as long as it takes.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Nelkap\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Pause a run - Nelkap\">\u003cmeta data-mint-head property=\"og:description\" content=\"Sleep for a while, or wait for an event, for as long as it takes.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Nelkap\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.nelkap.com/guides/pause\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://holotus.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Pause+a+run\u0026amp;description=Sleep+for+a+while%2C+or+wait+for+an+event%2C+for+as+long+as+it+takes.\u0026amp;theme=af0a82a6763931f98c06d253\u0026amp;signature=28865c7eb48f0dd1d0d5894ba471c0b6a9424053f7ce558f666efe23bfa1d2da\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Pause a run - Nelkap\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sleep for a while, or wait for an event, for as long as it takes.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://holotus.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Pause+a+run\u0026amp;description=Sleep+for+a+while%2C+or+wait+for+an+event%2C+for+as+long+as+it+takes.\u0026amp;theme=af0a82a6763931f98c06d253\u0026amp;signature=28865c7eb48f0dd1d0d5894ba471c0b6a9424053f7ce558f666efe23bfa1d2da\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/holotus/eYVqUhGxTrXUsFyv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Nelkap\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#e17100\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.nelkap.com/guides/pause\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/pause.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.nelkap.com/#organization\",\"name\":\"Nelkap\",\"url\":\"https://docs.nelkap.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/holotus/RV7BD0r7AMXMDw7i/logo/light.svg?fit=max\u0026auto=format\u0026n=RV7BD0r7AMXMDw7i\u0026q=85\u0026s=f5f88593d5630ef81de534d6d052cc79\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.nelkap.com#website\",\"name\":\"Nelkap\",\"url\":\"https://docs.nelkap.com\",\"publisher\":{\"@id\":\"https://docs.nelkap.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.nelkap.com/guides/pause#webpage\",\"url\":\"https://docs.nelkap.com/guides/pause\",\"name\":\"Pause a run\",\"description\":\"Sleep for a while, or wait for an event, for as long as it takes.\",\"dateModified\":\"2026-10-23T21:40:07.500Z\",\"isPartOf\":{\"@id\":\"https://docs.nelkap.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.nelkap.com/guides/pause#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.nelkap.com/guides/pause#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.nelkap.com/guides/serve\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pause a run\",\"item\":\"https://docs.nelkap.com/guides/pause\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.nelkap.com/guides/pause#article\",\"headline\":\"Pause a run\",\"name\":\"Pause a run\",\"description\":\"Sleep for a while, or wait for an event, for as long as it takes.\",\"url\":\"https://docs.nelkap.com/guides/pause\",\"mainEntityOfPage\":{\"@id\":\"https://docs.nelkap.com/guides/pause#webpage\"},\"dateModified\":\"2026-10-23T21:40:07.500Z\",\"publisher\":{\"@id\":\"https://docs.nelkap.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.nelkap.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Nelkap\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Nelkap","nav":{"global":null,"pages":[{"group":"Get started","pages":[{"title":"Introduction","href":"/index"},{"title":"Quickstart","href":"/quickstart"},{"title":"Installation","href":"/installation"}]},{"group":"Concepts","pages":[{"title":"How it works","href":"/concepts/how-it-works"},{"title":"Workflows","href":"/concepts/workflows"},{"title":"Steps","href":"/concepts/steps"}]},{"group":"Guides","pages":[{"title":"Serve your workflows","href":"/guides/serve"},{"title":"Start runs","href":"/guides/start-runs"},{"title":"Events and webhooks","description":"Start workflows and wake waiting runs with events.","href":"/guides/events"},{"title":"Pause a run","href":"/guides/pause"},{"title":"Handle failures","description":"What happens when something fails, and how to go another way.","href":"/guides/failures"},{"title":"Monitor your runs","href":"/guides/monitor"}]},{"group":"SDK reference","pages":[{"title":"Nelkap","href":"/reference/nelkap"},{"title":"registerWorkflows","href":"/reference/register-workflows"},{"title":"run","href":"/reference/run"},{"title":"emit","href":"/reference/emit"},{"title":"handle","href":"/reference/handle"},{"title":"step.run","href":"/reference/step-run"},{"title":"step.sleep","href":"/reference/step-sleep"},{"title":"step.wait","href":"/reference/step-wait"},{"title":"step.score","href":"/reference/step-score"},{"title":"Errors","href":"/reference/errors"},{"title":"Limits","href":"/limits"}]}]},"title":"Pause a run - Nelkap","buildId":"dpl_7GUK3ixdQTF3BSNUQYJm8ibGxQWw","deploymentId":"dpl_7GUK3ixdQTF3BSNUQYJm8ibGxQWw","dynamics":[],"chunks":[]}