Skip to main content
comet resume-probe solves the “recovery recognition” problem in long-running work. Typical case: you want to continue an existing Comet change, but the session, context window, or device has changed. The Agent no longer has continuous chat context, and no new /comet trigger was issued.
The commands on this page are called by the Agent behind the scenes. You do not run them yourself. In day-to-day work you just enter /comet in the conversation, answer the Agent’s questions, or say “continue”. This page is for troubleshooting in a terminal, writing scripts, or integrating another Agent platform.
The probe performs a read-only comparison between the current request and active changes, then decides whether to return to Native or Classic. This prevents the Agent from misclassifying “continue the previous login refactor” as a brand-new task. It first reads project .comet/config.yaml to determine Native or Classic, then reads only the active changes, current phase, and user request for that workflow. Old Classic projects without valid workflow config use legacy fallback. If the configuration is corrupted, the probe stops and reports the configuration problem. The probe returns recognition and routing results without modifying a change or advancing phases. When a new session only finds a related change, it asks whether this request should continue it, even if the target is unique or the project already has a selection. After confirmation, the Agent loads the returned skill. An explicit request to resume a specified change can use nextCommand directly when its state permits.

Why recovery probing is needed

Long-running tasks rarely stay inside a single continuous context. The following situations can cause the Agent to lose track of an active Comet workflow:
  • Context compression, IDE window switching, or starting a new session;
  • Switching devices and cloning the same repository to continue;
  • A fresh Agent that sees only disk state and a vague instruction such as “continue the previous work”;
  • Asking naturally to continue without typing /comet.
Project initialization instructions guide the Agent to run a read-only resume probe before handling such requests. The probe identifies candidate targets and explains its reasoning based on configuration, active changes, phase, selection, and request text. Pure semantic relevance only indicates candidate existence; a new session still requires confirmation before resuming, unless you explicitly name a target change.

How automatic probing works

You can ask the Agent to continue in plain language without running comet resume-probe yourself:
Continue with the login refactoring just now.
comet init and comet update write recovery instructions into the project’s Agent instruction file. When ambient_resume is enabled, the Agent automatically runs a read-only recovery probe before processing natural-language requests that may belong to long-running work:
  1. Read the project configuration to determine whether Native or Classic applies.
  2. Compare your request, active changes, current phase, and local selection.
  3. When only semantic relevance or a project selection identifies the target, show its name and phase and ask whether this request should continue it.
  4. After confirmation, enter the corresponding workflow without scanning again. Handle unrelated requests or declined recovery as ordinary tasks, preserving the original change, approvals, and phase write constraints.
An ongoing session already in the Comet workflow reuses its prior confirmation; routine continuation, answering in-flow prompts, or context restoration will not prompt repeatedly. A new session that merely says “continue”, mentions a change name, or broadly requests verification prompts first; clear instructions like “continue cache-controls” or “commit the current change” directly identify the target. An explicit /comet invocation enters the configured workflow without probing. An explicitly invoked non-Comet Skill or slash command also bypasses the probe and executes directly. With ambient_resume: false, ordinary natural-language requests do not trigger Ambient Resume; explicit /comet remains available.

Agent and script invocation

An Agent or integrator can directly pass in requests:
It can also be read from standard input:

Handling return values

JSON uses comet.resume_probe.v2, including workflow, skill, entrySource, reasonCode, candidates, changeName, phase, nextCommand, and judgment evidence. When the input names or matches a resumable state, it also includes a resume object (containing the original workspace projectRoot, kind, pending confirmation question and options, continuation commandArgs, and related fields); when state is abnormal or requires troubleshooting, it includes diagnosticCommand. Native restores at any stage through /comet-native. comet native next is a state advancement command, not a recovery entry. The internal v1 probe of Classic’s built-in runtime remains compatible, but the top-level CLI returns v2.

When it returns ask_user

  • A new session finds only a loosely related change without an explicit request to resume that target, even when it is unique or already selected.
  • Multiple active changes exist, and your request does not name the target and there is no valid local selection or explicit target instruction.
  • Your request involves committing code, and it is unclear whether the commit belongs to an active change or unrelated files (commit-scope-ambiguous).
  • The active change lacks valid state files or the project configuration is corrupted.
  • The task is paused at a user decision point such as plan-ready confirmation, verification failure, or archive approval.
When the request is unrelated to an existing change, is a plain informational query or a standalone commit of existing files, or when the user explicitly declines to resume, the workspace has cleared selection via comet native select --none, or ambient_resume is disabled, the probe returns out_of_scope rather than ask_user. If you explicitly decline recovery and want to make independent edits in a Native workspace, run comet native select --none before editing files. In Native mode, uncommitted changes serve only as recovery evidence and reminders and do not block strong models from entering /comet-native to inspect the workspace. Classic continues to enforce working-tree ownership checks.
ask_user indicates insufficient evidence or a state machine waiting for a user choice. The caller should explain why the probe paused and wait for your reply. Running the probe again does not supply the missing information.

Command responsibilities

Next step

Last modified on December 1, 2026