Skip to content

Latest commit

 

History

History
512 lines (442 loc) · 42 KB

limits.md

File metadata and controls

512 lines (442 loc) · 42 KB

Orchestration limits

The readers of this page are the orchestrator and the task subagents.

Limits

These limits apply to the orchestrator and to the task subagents, except where a bullet or a rule names one actor.

The row of the orchestrator and the rows of the task subagents in the table give the kinds of command of the list of each of them. A read at a gap follows the rules for the lists.

  • The task subagent reads the output of a task with the tasker show commands, for example tasker show, tasker show-plan, tasker show-verify and tasker show-review. The own-worktree rule gives the rule for a direct read of a file of the data folder of tasker, for example a transcript or a log file.

  • To read the commits of a task branch, the task subagent runs git fetch tasker in the local clone of the orchestrator. If the clone has no tasker remote, the task subagent adds it as the own-worktree rule says. Then the task subagent runs git log or git show on tasker/<task branch>. For a diff of the task, the task subagent uses the command with three dots of the diff read. In a split read, the task subagent also uses git diff <commit>~1 <commit> for each commit of the range. If a command fails, the task subagent stops and reports the error. Nothing changes.

  • If a git fetch of a task subagent fails, also after a timeout (exit code 124), and its step gives no failure path, the task subagent runs the fetch one more time. If the fetch fails again, the task subagent stops and reports the command and the error. A step that gives its own failure path keeps it.

  • The task subagent installs dependencies in its local task worktree only before a direct npm script or test there. A tasker command alone requires no dependency install in that worktree. Examples are tasker execute, tasker verify and tasker review. The local task worktree is the worktree of the own-worktree rule, not a worktree of tasker.

    Before each direct npm script or test there, the task subagent applies both install cases below. If the worktree has no node_modules, the task subagent runs npm ci there. If package-lock.json differs from the copy of the last install, the task subagent runs npm ci there. Examples are npm run check, npm run format:check and the test loop of the measure rule. On #400, npm run format:check failed in a new task worktree with prettier: not found until npm ci ran. Use the copy of the commit check: L=$(git rev-parse --git-path npm-ci-lock); cmp -s "$L" package-lock.json || { npm ci && cp package-lock.json "$L"; }.

  • The task subagent uses only the issue, the files of the repo, its own tests on the local machine and the answers of the orchestrator as sources. If the issue does not give a detail that the work needs, the task subagent asks the orchestrator. Then the task subagent waits for the answer, as the answer-wait rule says. Before tasker approve, the stop rule and the design-gap rule give the steps and say who answers. After tasker approve, a stop under the fourth case of the stop rule follows Land the work. The missing-detail rule above still applies. The orchestrator asks the user when a missing detail needs the user's answer. When the task subagent asks the orchestrator a question, the task subagent gives the options, with its suggestion for each.

  • The task subagent changes only its own issue. On GitHub issues, labels and the project board, the comment of step 11 of "Run one ticket" is the only write of the task subagent. The task subagent does not edit an issue body, a label or the project board. This rule does not cover the git commands and the tasker commands of the steps on the orchestration pages, for example tasker merge and the delete of the task branch in step 10. On GitHub Actions, the rerun of step 9 of the CI wait (gh run rerun <run id> --failed) is the only write of the task subagent.

  • If tasker stops for a quota, follow "Quota". Never run tasker approve-credits.

  • If a tasker run fails and the task is a possible Codex limit, do the steps of A Codex limit. Do them before any tasker command that changes the task.

  • Do not install tasker from a task worktree, also not with npm link. Install tasker with npm run install:global, as the Install section of README.md says. The install runs in the current clone, on the commit that is checked out. The installed tasker runs the tickets, and an install replaces it.

  • No session writes memory, as the memory rule says. A task subagent also deletes no memory note, so that two task subagents do not change the same file. Task subagents report what they learn to the orchestrator in their final report (see the final report). A task subagent does not run /session-review, because the skill deletes memory notes. The bullet "When the final report of the task subagent of a ticket says that the ticket landed" of Land the work says when the orchestrator deletes a note.

  • The orchestrator and each task subagent load the simple-english skill and follow the simple-english bullet of Docs of rules.md.

  • The folder of a task subagent is $HOME/Documents/tasker/agents/<session name>. The session name is the name of the session of the task subagent from "The prompt of a task subagent", for example codeguru42-tasker-43. The task worktree of the own-worktree rule is ../tasker-worktrees/<session name>, relative to the root of the local clone of the orchestrator. That path is a folder with the session name in the folder tasker-worktrees, next to the local clone of the orchestrator. The task worktree is not in the folder of the task subagent and not in the clone. The orchestrator makes the folder of the task subagent before the task subagent starts, as "The prompt of a task subagent" says. The task subagent keeps each other file that it writes in the folder of the task subagent, for example the feedback files and the notes. Two task subagents that run at the same time keep their files in different folders. The task subagent does not write a file in the scratchpad folder that Claude Code names in the system prompt of the task subagent. The reason: each task subagent of one orchestrator gets the same scratchpad folder as the orchestrator. This rule wins over the instruction of the system prompt of the task subagent to use the scratchpad folder for temporary files. For example, on #519 (2026-10-25), the task subagent wrote two files in the scratchpad folder and then moved them to the folder of the task subagent. It overwrote nothing. Before a task subagent runs tasker refine or tasker review <issue> "<feedback>" with feedback text from a file, the task subagent makes sure that the file holds the text for its own ticket. The plain-form rule gives the form of the command. If two task subagents use the same file name, the refine or the review of one ticket can send the text of another ticket. The folder of the task subagent stays after the work. The task subagent removes only the task worktree, as the own-worktree rule says.

  • If a gh issue, gh label or gh run command runs outside a git repo with no -R flag and no issue URL, it fails. The error holds fatal: not a git repository. The folder of a task subagent is outside a git repo. As a result, the task subagent adds -R <owner>/<repo> to each such command that it runs in its folder. <owner>/<repo> is the owner/repo part of the issue key of the ticket.

  • Do not use pkill or killall. To stop a process that it started, the orchestrator or the task subagent uses kill with the process id that it saved. pkill matches by name, so it can stop a process of another session of the same user.

  • Never print a credential, for example an access token, a password or a key. If a command gives a credential, store its output in a shell variable, for example token="$(gh auth token --hostname github.com --user <account>)". Do not print the variable. To make sure that the command succeeded, use its exit code or a test of the variable that prints nothing, for example [ -n "$token" ]. Pass the variable to later commands, for example GH_TOKEN="$token" gh api user. Do not put the credential itself in a command line, a file, a log, a feedback text or a comment. Never print the environment, for example with env, printenv or set, because it can hold a credential, for example the access token in GH_TOKEN. The assistant tools start a new shell for each tool call, and a shell variable lives only in its own shell. As a result, set the variable and use it in the same tool call. Never print the full command line of the sandbox, for example with ps -o args. The sandbox of a claude run is a bwrap process. Its command line holds a user name and a password of the local proxy of that run. On 2026-10-14, a task subagent printed them in its tool output with ps. To find a bind or a path in the command line, search it for only that item, and print only the match. For example, ps -o args= -p <pid> | grep -o -F -- '<path>' prints only <path>, and only when the command line holds it. This rule does not cover the code of tasker, which already keeps the access token out of its errors and logs.

  • The issue-link rule is in docs/dev/shared/working-with-the-user.md.

The own-worktree rule

The orchestrator and the task subagents must not read the files that tasker keeps in its data folder. Never read, search or run anything in a worktree of tasker, also not with a read-only command such as grep. Do not change the repo or the worktrees of tasker by hand. Only tasker commands change them. The read has two exceptions. The first exception is a fetch through the read-only tasker remote, which reads the clone of tasker and changes nothing there. The second exception is a read that the user permits. A read of a file of the data folder, for example the database tasker.db, a log or an archived prompt, is allowed only when the user permits that read. The second exception does not cover a worktree of tasker. Before the read, the orchestrator asks the user, with the fact that it needs and the command that it plans. A task subagent asks the orchestrator, as the sources bullet of Limits says, and the orchestrator then asks the user. For a task subagent, the orchestrator does the read and gives the fact to the task subagent as an answer. Without that permission, the tasker commands are the only way to read the state of a task. For a task subagent, the first bullet of Limits names these commands. The reason: a tasker command does not give every fact, for example the time of an event, and a direct read without permission is a read of data that the user owns. On 2026-10-17, an orchestrator read event times from tasker.db with sqlite3 -readonly, and the user said: "you need to ask permission before accessing any tasker resources". tasker show <issue> prints the worktree of the task on its worktree: line, and the rule of this paragraph covers that worktree.

The orchestrator has a third exception for the files of its own orchestrator folder. The orchestrator folder gives this exception and its limits.

To read or run the code of a task, the task subagent uses its task worktree. The task worktree is the one worktree of a task subagent for its task. It is a worktree of the local clone of the orchestrator, in the folder that the folder bullet of Limits gives for the task worktree. It is on a local branch with the same name as the task branch. The task branch is on the branch: line of tasker show <issue>.

  • Make: the task subagent makes the task worktree one time, after tasker start in step 2 of "Run one ticket" or in the comeback rule. If the local clone has no tasker remote, add it as steps 1 and 2 of the remote setup say. Then run git fetch tasker. If the fetch fails, stop. Nothing changes. Then run git worktree add -b <task branch> <path> tasker/<task branch>. If it fails for a reason other than the branch-exists case, stop. No worktree exists.
  • The path: the task subagent keeps <path> from the make until the remove at the end. The task subagent keeps <path> as an absolute path, because git resolves a relative path against the current folder of each command. Each later step uses that path. This includes the <path> of steps 6, 18 and 19 of rebase-conflicts.md.
  • Use: each step that reads or runs the code of the task uses the task worktree, after the update rule.
  • The branch-exists case: the make fails with fatal: a branch named '<task branch>' already exists and exit 255. Git makes no folder. The local branch can hold commits that tasker does not hold, for example after a stop of the manual fix. Do these steps before the first update:
    1. Read <hash> with git rev-parse --verify tasker/<task branch>. Then run git merge-base --is-ancestor <task branch> <hash>.
    2. If the exit code is 1, the local branch holds a commit that tasker does not hold, or tasker rewrote the task branch after the last update, for example with a rebase or an autosquash. The step cannot tell the two apart. Stop. The branch and each worktree of the branch stay.
    3. If the exit code is neither 0 nor 1, or a command fails, stop.
    4. If the exit code is 0, run git worktree list --porcelain. If an entry has the line branch refs/heads/<task branch>, use the worktree <path> line of that entry as the task worktree.
    5. If no entry has that line, run git worktree add <path> <task branch>, with no -b and no --detach. For a branch that no worktree holds, this makes a worktree on the branch.
    6. Then do the update rule.
  • The remove: the task subagent removes the task worktree only at the end of its work. The end is after step 10 of "Run one ticket", after tasker abort, or when the orchestrator tells the task subagent to end its work. Run git worktree remove <path>. Do not use --force. If the remove fails, stop, as step 19 of rebase-conflicts.md says. The worktree and the local task branch stay. Then delete the local task branch with git branch -D <task branch>. If the delete fails, stop. The worktree is gone, and the local task branch stays. The orchestrator reports to the user.
  • Exceptions to the remove: if the task subagent followed rebase-conflicts.md, steps 18 to 20 of that page do the remove. The task subagent does not do it again. While the local-commit rule holds, the worktree and the local branch stay. They also stay after a step of rebase-conflicts.md stops. The final report names each path that stays.
  • Worktree commands change no task. The task keeps its state.

The orchestrator folder

The orchestrator folder is the folder <data root>/<repo slug>/orchestrators/<slug>/ of one orchestrator. It holds the open questions, the waiting items of planning work and the handoff files of that orchestrator. These files are the own state of the orchestrator, not files that tasker keeps. A file there stays through a compaction of the context and through a handoff.

The terms of this section:

  • The data root is the value dataRoot in the output of tasker show-config, with no --repo.
  • The repo slug is the slug of The repo slug. For example, the repo key codeguru42/tasker gives codeguru42-tasker.
  • The slug is the slug of the own name of the orchestrator, as the glossary defines it. For example, orchestrator-m31 has the slug m31.
  • The three folders are questions/, proposals/ and handoffs/ in the orchestrator folder.
  • A call on the three folders is a mkdir -p, an ls, a Read call, a write or a delete in the three folders.
  • drafts/ is the folder <data root>/<repo slug>/orchestrators/<slug>/drafts/. It is in the orchestrator folder, but it is not one of the three folders. It holds the files of each new draft of the planner subagents of the orchestrator. The prompt gives its use.
  • The old folder is the folder /tmp/tasker/<own name>/drafts/, with the own name of the orchestrator. It holds the drafts that a planner subagent wrote there before drafts/ existed. It also holds the drafts of a time of the bar.
  • The writers in drafts/ and in the old folder are the orchestrator, the planner subagents, the issue-draft subagents and the issue-post subagents of that orchestrator. The readers are these actors and also the issue-review subagents and a question session of a pane of that orchestrator.
  • The own handoff folder is handoffs/. The shared handoff folder is the folder of The handoff file.

An example of an orchestrator folder is $HOME/.local/share/tasker/codeguru42-tasker/orchestrators/m31/, as a name of a folder, not as the path of a call. The question file gives the files of questions/. The proposal file gives the files of proposals/. The handoff file gives the files of handoffs/.

Only an orchestrator of that slug writes in its three folders. In drafts/, the writers are the writers that the terms of this section give. tasker makes, reads and changes nothing there. Two orchestrators with different slugs have different folders, as The slug says. During a handoff, the old and the new orchestrator of one slug both run. After the write of its handoff file, the old orchestrator writes no new file in the three folders and gives no new question id.

Before its first call on the three folders in a session, the orchestrator reads the data root with tasker show-config | jq -r '.dataRoot'. This read is a K1 command. Step 1 of The orchestrator's data root and questions uses the same read. An empty output or the output null is a failed read. The form with --repo prints null, because its output holds only the keys of the repo.

Before its first list or write of one of the three folders in a session, the orchestrator makes that folder with mkdir -p. On 2026-11-22, with GNU coreutils 9.7, a measure in a folder under /tmp gave these results. A mkdir -p on a folder that exists exited with 0. An ls of an empty folder printed nothing and exited with 0. An ls of a missing folder exited with 2. So the list of a new folder prints nothing, and an empty questions/ means that no open question with a file exists.

Each call on the three folders uses the absolute path of the file or the folder. The path starts with the data root as the read printed it, with no $HOME and no ~. No call uses cd. The reasons: the Read tool and the Write tool take an absolute path. Also, the ask rule Bash(cd $HOME/.local/share/tasker/*) of Claude Code asks the user at a cd into the data root.

The forms of the calls for the kind claude:

  • A write: the Write tool.
  • A read: the Read tool.
  • A list: ls <folder> in a plain call.
  • A make: mkdir -p <folder> in a plain call.
  • A delete: rm <file> in a plain call, with no -r and no -f.

An orchestrator of the kind pi or codex runs the same ls, mkdir -p and rm in its shell. It reads a file with cat <file>. It writes a file with cat > <file> <<'EOF', with a quoted end word. The measured pi sessions had only the tool bash, as The kind of the orchestrator says.

No one measured these calls on a file under the data root, for any kind. No one measured whether Claude Code asks a permission prompt for them. No one measured whether the classifier of the auto mode denies them. The first use can show a permission prompt or a denial, and the fallback of this section covers that case.

The orchestrator runs two calls on drafts/, both for the kind claude:

  • A make, mkdir -p <drafts>, before the first count read of a session, if the folder can be missing.
  • The count read, ls <drafts> | sed -n -E 's/^plan-([0-9]+)-.*/\1/p' | sort -n | tail -n 1, before each start of a planner subagent. The name gives its use.

Both are plain calls. Each uses the absolute path that starts with the data root as the read printed it, with no $HOME, no ~ and no cd. A count read passes only with no error and an empty output or one number. Each other result fails, also an error text in the output. The reason: with GNU tools, an ls of a missing folder printed its error text on stderr, and the whole count read exited with 0, the code of tail. So the exit code is no sign of a failure, and the error text is. The output is at most one short line. The reason: drafts/ grows with each draft, and a full list at each start fills the context of the orchestrator.

The two calls use the data root of the read of the session. If no read of the session gave the data root, the orchestrator reads it first, as for the three folders.

The orchestrator runs no other call on drafts/, except the read-only calls of the check of the pane owner. These calls are no git command and no cd command, so no ask rule of Claude Code matches them. No one measured them on a file under the data root.

For the planner subagents, the issue subagents and a question session, none of their calls on drafts/ is a git command or a cd command, so no ask rule matches them. No one measured whether Claude Code asks a permission prompt for them or whether the classifier of the auto mode denies them. A denial follows the tool-block rule and starts the bar. The issue-review subagent and the question session write nothing in drafts/.

A call on the three folders, the read of the data root, a call of the two calls on drafts/, or a call on a file of drafts/ can fail or get a denial of the tool-block rule. The list "These events start the bar" below is the only list of the events. For a failure, the failure rule applies. A failed read of the data root or a failed mkdir -p counts as a failure of the call after it. After a denial, the step of the denied call stops, as step 1 of the tool-block rule says. A denied call of the check of the pane owner stops only that call. This sentence is about step 1 of the tool-block rule and does not decide the bar. After a failure or a denial, the fallback holds:

  • The orchestrator runs no later call on the three folders and no later call on drafts/ until the next word of the user. This rule is the bar. One bar covers the three folders and drafts/.
  • Until that word, the orchestrator keeps each new question and each new item of planning work in its session. A pane starts with the text from the session.
  • The rest of the work of the orchestrator goes on.
  • The next word of the user ends the bar for all calls on the three folders and on drafts/.
  • Before its next start of a planner subagent after the bar, the orchestrator makes a missing drafts/ and runs the count read again. While the bar holds, the prompt of each new planner subagent gives the old folder.
  • After that word, the orchestrator writes a question file for each open question that its session holds with no file. It also writes a proposal file for each item of planning work that waits in its session with no file. The items start in the order of arrival, under the configured count of planner subagents.

These events start the bar:

  • A failed or denied call on the three folders.
  • A failed read of the data root, or a failed or denied call of the two calls above on drafts/.
  • A failed or denied call on a file of drafts/. A denial reaches the orchestrator through the tool-block rule: from an issue subagent through its planner subagent, from a planner subagent, or from a question session to its pane owner. Another failure reaches it through the result of a planner subagent.
  • A failed or denied Read call of the check of the pane owner on a draft file in drafts/, or a denied ls of drafts/ in that check. Such an own call of the orchestrator reaches the orchestrator at once.

These events start no bar: a read of a file that does not exist, and a failed or denied size count. The reason for the first: it shows no fault of the access to the folder, and A missing draft file gives the steps. The reason for the second: each size count keeps its own rule for a failure.

The reason for a bar after a failed call on a file of drafts/: each later planner subagent gets the same folder and can get the same failure, and the bar stops this repeat until the user decides. The reason for one bar: one bar is simpler than a second bar with its own states, as Simplify over special rules says. The cost: one failed call on a file of drafts/ also stops the calls on the three folders. New questions and new planning requests then stay only in the session until the next word of the user, and the write of the handoff file also waits for that word.

The bar has three states:

  • Not started: the orchestrator runs the two calls before each start, and the prompt gives drafts/.
  • Holds: the orchestrator runs neither call, the prompt of each new planner subagent gives the old folder, and the start does not wait.
  • Ended by the next word of the user: before the next start, the orchestrator makes a missing drafts/ and runs the count read again. If they pass, the prompt gives drafts/.

Step 6 of the tool-block rule stays. The orchestrator brings each denial to the user in its question pane, and that pane starts with the text from the session. For a denied list of questions/, the rule of The question file for a failed list wins over the time of step 6. The denial first goes to the user in the tab, and its pane waits for the next word of the user. While the bar holds, the write of the handoff file of the orchestrator waits for the next word of the user.

The end of the start steps is the point after The start checks. After a handoff, it is also after The check of the handoff folder. At the end of its start steps, the orchestrator lists questions/ and proposals/. So an automatic start can find a question that a session before it left. A start with no handoff file is a start whose first prompt names no handoff file. A stop with no handoff gives the steps for the files of such a start.

The orchestrator folder is an exception to the own-worktree rule. The exception covers the orchestrator. In drafts/ of its own orchestrator, it also covers the planner subagents, their issue subagents and a question session of a pane of that orchestrator. The exception has these limits:

  • The orchestrator makes, lists, reads, writes and deletes files only in its own three folders. Its mkdir -p can also make the parent folders of the three folders. It also runs the two calls on drafts/ that this section gives.
  • For the check of the pane owner, the orchestrator also lists the folder of the draft files with ls <folder>. It reads the drafts there with the Read tool. The folder is drafts/ and the old folder. These calls only read. They are the one read-only exception to the rule of no other call on drafts/, and an allowed exception to each other limit of this section on the calls in that folder. The bar of the fallback stops them in drafts/ too.
  • The exception covers no other file of the data root and no worktree of tasker.
  • The exception covers no task subagent, no opener subagent, no reuse subagent and no write subagent. It covers the calls of the writers and readers of drafts/ and the old folder that the terms give, for the planner subagents, their issue subagents and a question session. It covers them only in drafts/ of their own orchestrator, and in the old folder. It covers no call on the three folders, no other file of the data root and no worktree of tasker.
  • The kinds pi and codex make no drafts/ and run no count read.
  • The end of the start steps runs no call on drafts/.
  • No session deletes a file of drafts/. The cost: the folder only grows. On 2026-11-24, the old folder of orchestrator-m31 held 398 names.
  • A read of another file of the data folder still needs the permission of the user, as the own-worktree rule says.
  • The exception also covers a Read call on the handoff file that the first prompt names, also before the read of the data root. The reason: The start checks read the tab id of the old orchestrator from that file.

The files of the orchestrator folder are not memory, as docs/orchestrator.md says.

The update rule

tasker changes the task branch in its own clone, for example with tasker execute, tasker refine and tasker update-branch. The task worktree does not follow by itself. Before each use, the task subagent does these steps in the task worktree:

  1. Run git fetch tasker.
  2. Read <hash> with git rev-parse --verify tasker/<task branch>. The hash lives only for this update.
  3. Run git rev-parse --git-path rebase-merge. If the command fails, or the folder that it names exists, stop. Nothing changes. Then run git rev-parse --git-path BISECT_START. Make sure that the command succeeds and its named file does not exist. If either condition fails, stop without reset or cleanup. Nothing changes. For example, the worktree stays in a rebase when git rebase --abort fails in step 7 of the commit check.
  4. Run git status --porcelain. If it prints a line, stop. Nothing changes. Test the output, because the command exits with 0 also when it prints lines. Ignored files such as node_modules/ do not print.
  5. Run git reset --keep <hash>.

git reset --keep moves the branch for a fast-forward. It also moves a branch that a rebase of tasker rewrote, where git merge --ff-only fails with exit 128. For a change in a file that the update changes, --keep refuses with exit 128 (error: Entry '<file>' not uptodate. Cannot merge.), and the branch and the change stay. Step 4 already stops for each uncommitted change. As a result, no update runs over one. Do not use --hard, because it deletes changes that are not committed. If a step fails, the step that uses the worktree gives the failure path. The commands of the update rule change no task.

The local-commit rule

The local task branch holds no commit of its own, with two exceptions. The first is the manual fix, from its step 2 to step 11 of rebase-conflicts.md. The second is rebase-conflicts.md after a rebase conflict of tasker update-branch, from step 7 (the rebase) to step 11 (--take-remote). In that time, the task subagent does not run the update rule. If the task subagent stops in that time, for example after a failed push at step 10, the worktree and the local branch stay. The rule ends at each step 11 of docs/dev/task-subagent/rebase-conflicts.md, except at the new conflict of that step. At that new conflict, the rule holds with no break through the loop of that step. After each other step 11 of that page, tasker holds the local tip (<taken>), and the rule ends. The manual fix and rebase-conflicts.md link to this rule.

The shared-clone rule

Every orchestrator and every task subagent on the machine run git in one local clone. As a result, a git command of any session, for example git fetch, can run between two commands of a step. On 2026-10-15, git worktree list in the local clone listed the worktrees of the task subagents of other orchestrator sessions. A remote-tracking ref is the copy of a branch of a remote in the local clone, for example origin/<branch> or tasker/<branch>. If a step uses a remote-tracking ref in more than one command, the step reads the full hash of the ref one time, with git rev-parse --verify <ref>. Each later command of the step uses that hash, not the ref. For example, if step 10 of "Run one ticket" read origin/<task branch> for the check and again for the delete, a fetch between the two reads can move the ref, and the delete then acts on a commit that the check did not see. Use --verify, because plain git rev-parse also prints the name on its output when it fails. If git rev-parse --verify fails, for example because the ref does not exist, it exits with 128 and prints fatal: Needed a single revision. The step then stops, as the failure cases of that step say. If a step uses a remote-tracking ref in only one command, the step needs no hash read. The update rule reads tasker/<task branch> one time and resets to that hash.

The address rule

The task subagent sends each message to the orchestrator with SendMessage and to: "main". The task subagent puts "main" in the to option of SendMessage, not in the text of the message. The session name of the orchestrator, for example orchestrator-m8, is not the address. The rule covers each message that the task subagent sends while it works. Examples are the run-start and run-end reports of "When there is no reset time yet" in "Quota", the reports of the stop cases, the list of files after tasker approve and the questions.

The rule does not cover the final report (see the final report), except after a refused SubagentHandback call. The task subagent of #153 learned this rule on 2026-10-15.

The answer-wait rule

When the task subagent must wait for an answer or a next step from the orchestrator, the task subagent sends its report or its question with SendMessage, as the address rule says. Then the task subagent gives its final answer, which ends its turn. This final answer is an interim report (see the final report). The task subagent does not wait in a loop. The message of the orchestrator with the answer or the next step starts the task subagent again. The reason: a message to a task subagent that has ended starts the task subagent again, and the task subagent keeps its context (see "Terms" in "Quota"). On #153, the task subagent waited about 25 minutes in a loop for an answer, then ended its turn with a stop report. The message with the answer started the task subagent again, and the task subagent went on with its work.

In Claude Code 2.1.314, a subagent gives its final answer with the tool SubagentHandback. The text of the tool says that plain text at the end of a turn does not reach the orchestrator. It also says "Use it once", "The call ends your run" and "do not use it for progress updates or questions". The subagent still uses this tool for an interim report, because it has no other final answer. On 2026-10-30, a SendMessage after a SubagentHandback call started a background subagent again with its context. After this start, a second SubagentHandback call of that subagent also reached the session that started the subagent.

A refused SubagentHandback call is a call of that tool whose result says that nothing was sent. An example of such a result is "Nothing was sent: your report was already delivered (SubagentHandback delivers one report). Use SendMessage for anything further, then stop." After a refused SubagentHandback call, the task subagent sends the same report with SendMessage, as the address rule says. The message starts with a line that says that Claude Code refused the SubagentHandback call. The report follows that line with no change. Then the task subagent ends its turn.

This send covers the final report and each interim report that the task subagent did not send with SendMessage before the call. It does not cover a final answer that follows a report with SendMessage. An example is the final answer of a stop. It also does not cover the interim final answer of a task subagent that stays in its wait, as the task subagent notice says. The orchestrator takes the message of a refused SubagentHandback call as the report of that call. If the SendMessage call fails, the task subagent ends its turn, and the report stays only in its transcript.

Claude Code 2.1.318 refused a second SubagentHandback call after a start by the end of a background command. On #734 (2026-11-04), the task subagent gave an interim report with SubagentHandback while its background command ran, against the wait bullet of the command rules. The end of that command started the task subagent again, with no message of the orchestrator. Claude Code refused its next SubagentHandback call, the final report, and the final report did not reach the orchestrator as a message.

In a test on the same day, a SendMessage started a test subagent again, and its second call reached the session that started it. In another test on that day, the end of a background command started a test subagent again. Claude Code refused its second call, and a SendMessage after it reached the session that started the subagent. No one measured how often Claude Code refuses a second call, a third call, or a call after a start by another event. An example of another event is the report of a subagent of the task subagent.

A stop of a task subagent has these parts:

  • The task subagent runs no other tasker command until the orchestrator tells it the next step.
  • The task subagent sends its report with SendMessage, as the address rule says.
  • The task subagent gives its final answer, which ends its turn.
  • The task keeps its state.
  • The message of the orchestrator with the answer or the next step starts the task subagent again.
  • The step that stops names what stays behind, for example a worktree or a branch.

A step that stops gives only the facts that differ from this list, for example a state of the task that changes, what stays behind, or a report to someone other than the orchestrator. When a step of the orchestration pages sends the task subagent to docs/dev/task-subagent/rebase-conflicts.md, each stop of its procedure is a stop.

For a resume message during the wait, see the resume rule in "When the job fires". The rule does not cover a wait that reads a state, for example the "To wait" bullet of "Land the work" or the wait bullet of the command rules.

A wait point is a place where the task subagent waits for an answer or a next step from the orchestrator. Each stop is a wait point. At each wait point, the orchestrator expects an interim report from the task subagent. The harness is the tool that runs the task subagent. The harness can deliver the final answer of the task subagent to the orchestrator in the same way as the final report. At a wait point, the task subagent starts its interim report with a line that says that the report is not the final report. That line also names what the task subagent waits for.

The orchestrator does not treat an interim report as the end of the ticket. For an interim report alone, the orchestrator does not free the slot, delete a quota job or read the board for the ticket. The orchestrator still follows the bullets of Delete the job. The orchestrator still does each read that a rule gives after a report of a task subagent, for example in the parent-hold rule. On #160, #161 and #221, the task subagents ended their turns at a wait point, and a message of the orchestrator resumed each one.

The failure rule

If a command or a tool call of the orchestrator fails, the orchestrator tells the user the command, or the tool, and the error. No task changes. The orchestrator does the other steps of its rule, unless the rule says that it stops or waits.