Wait for another task
One agent is adding a way to mark books as read in your reading-list app. Another will add a view of unread books. The second task needs the first result, but you do not need to watch both sessions and announce the handover yourself.
Your agent can use discern_await to wait for the relevant repository state. When the condition holds, discerndiscernA tool that installs and runs an agent development practice in a project. returns the next step for bringing that work into the waiting task. For checked work, it looks for Proof: discern's record of the configured checks that passed.
Ask for the handover you want
§Tell the waiting agent what it needs and when it may use it:
Build the unread-books view once the task that marks books as read has current Proof. Use discern-await-the-fleetFleetThe project's collection of task worktrees. to wait for it, bring in its work, and check that marking a book as read works before you continue.
Your agent resolves the other task's exact branch or worktreeWorktreeA separate working copy and branch for one effort. identity. Include its returned branch or path if you have it; a display title alone may not identify one task. The agent keeps working in its own worktree, or waits from the main checkout if its dependent effortEffortOne task carried through implementation and review: the work a worktree, its branch, and its submission all belong to. has not started yet.
A condition that is already met returns immediately. You can give the request without first checking whether the earlier session has finished.
Choose the condition
§The useful distinction is whether the next task can build on checked work or needs work that has already reached the shared branch.
A green task is ready to build on under the plan; its Proof does not grant permission to land. If the dependent task needs your approval, that decision still waits for you. Proof, review, and authority explains the distinction.
Start the wait
§Your agent normally calls the discern_await tool with the waiting worktree's absolute path and one condition. The command-line equivalent for an illustrative branch is:
discern await --green agent/mark-books-read-b41f2c
The other choices are --landed <worktree> and --trunk-moved. A named task can be identified by its returned worktree id, absolute path, local branch, or full local ref. --landed holds once the task's submitted work is reachable from the trunk — including when its landing composed it with other changes in an integration worktreeIntegration worktreeA disposable worktree a landing creates for itself when the trunk moved after a submission's Proof., so the landed commit is not the branch tip itself. The CLI reference lists the exact options.
The agent leaves the timeout unset so discern chooses the longest reliable call window. It follows continuation instructions if the work is still in progress. You do not need to supply a delay or ask it to check again every few minutes.
Compose what arrived
§When the condition holds, the result tells the agent how to bring the work into its own task:
- For green work that has not landed, start from or update from the exact observed commit using
discern start --from <commit>ordiscern update --from <commit>. - For landed work or trunk movement, start from the trunk or bring it into the existing worktree with
discern_update.
The agent then checks the result it received. In the reading-list example, it should be able to mark a book as read before building the unread-books view. A successful wait establishes the repository condition; the task still needs that practical check.
Any overlap named by the update deserves a fresh read. Separate agents can make individually sensible changes that need adjustment when combined. The dependent task finishes with the normal gateGateThe configured checks a change must satisfy for ordinary completion. and review.
Continue an unresolved call
§If you inspect the raw result, ok: true with data.met: false means the call window ended while the condition was still unmet. The wait can continue.
The result supplies a resume handle. Your agent uses that handle with the same worktree path, without repeating the original condition, and continues until the condition holds or the dependency no longer matters. The handle preserves the original watch, including a relevant change between calls.
These continuation mechanics belong to the agent. The practical outcome for you is that a long-running prerequisite does not need repeated reminders.
Handle a refusal
§An ok: false result means discern cannot answer the watch as requested. It has no continuation. The agent follows its recovery and explains anything it cannot resolve.
For example, a green watch needs a worktree that can hold current Proof. If that checkout has been reclaimed, the result may point to a later branch containing the work or suggest waiting for its landing instead. A mistyped or ambiguous task selector needs correcting. A landing watch can recover an already completed landing from its durable Proof noteProof noteA durable copy of landed Proof, attached to the commit in Git. even after the branch is removed.
You can ask:
Explain why this wait cannot continue, where the earlier work is now, and which next step still fits our plan.
When waiting is the wrong tool
§Use this workflow for dependencies between worktrees in the same repository. It does not wait for a review decision, an external release, or helpers inside the agent's own session. The agent should also continue its own unfinished work rather than wait for itself to become green.
If the plan changes, tell the agent the dependency no longer matters. Ending the watch is safe; it does not change either task's code. Whether your message interrupts a running tool call immediately depends on your coding-agent host.
The bundled discern-await-the-fleet skill gives agents this procedure. Coordinate parallel tasks shows how it fits a larger plan, and MCP and results describes the detailed result and timeout contracts.