For developers · Orchestrator
Local inputs
On this page
Some issues need files that git does not carry: a git-ignored data folder, an untracked note, the transcript of an earlier agent session. They exist only on the machine where someone prepared them, usually the main host. A worker on another machine would not find them and would ask a person to copy them. Gitoodo brings them instead, so no person ever copies files for the autopilot (#1582).
Implemented in crates/core/src/inputs/ (lookup, placement, transfer format), the dispatcher's
side in crates/cli/src/dispatcher_inputs.rs and the worker machine's side in
crates/cli/src/satellite.rs (inputs_receive, place_inputs).
What counts as an input#
The issue body names them; nothing has to be declared elsewhere.
- Paths in inline code, relative to the repository:
`.scratch/research/data/txt/`,`notes/plan.md`. A path relative to the folder of another named input counts too (`data/meta.tsv`next to`.scratch/research/data/txt/`). Absolute and home paths, URLs, globs,..and.gitare never inputs; fenced code blocks are not read. - Agent session transcripts by their id: any
<uuid>.jsonlin the body. The main host looks forprojects/*/<uuid>.jsonlbelow the Claude Code folder (CLAUDE_CONFIG_DIR, else~/.claude) andsessions/**/rollout-…-<uuid>.jsonlbelow the Codex folder (CODEX_HOME, else~/.codex). The path as written belongs to the machine that wrote it and is not used; the id is the explicit reference. - Gitoodo's own log files as
`log:<file>`:`log:dispatcher.jsonl`(#1411), so a worker anywhere can analyse the dispatcher's production log of the main host. Only a plain file name in Gitoodo's log folder of the main host counts (<process>.jsonl,<process>-<pid>.jsonl,gitoodo.log, each also rotated with.1….N; a barelog:dispatchermeansdispatcher.jsonl); no folder, path, glob,.lockor stderr file (log_name). A current file comes with its rotated generations, so the hours before the last rotation come too; a rotated name (log:dispatcher.jsonl.2) is that file alone. They land in.gitoodo-inputs/logs/<file>. Logs never hold a token (see security), so they may go where the issue's worker runs, like a transcript.
No other file outside the repository is ever read.
Only the issue body counts, not comments: issues reach a worker only from trusted authors (see security), comments can come from anyone.
Files for every worker#
Some files every worker of a repository needs: a local .env, a git-ignored test data folder, a
local config. Settings → the repository → Workers → "Files for every worker" lists them once
instead of every issue naming them (#1583; worktree_files in the repository's entry of
orchestration.json, set with set_repo_worktree_files).
- Paths relative to the repository, a bare folder name (
fixtures) too; no globs, no absolute or home paths, no..or.git, at most 32 (normalize_repo_files). - The field takes one entry per line, commas separate too (a blank stays part of its entry and
is refused, so
test datanever becomes two paths). It checks them by these rules before storing and names the first wrong entry and why, instead of a bare "Saving failed" (#1621,src/views/settings/worktreeFiles.ts). - Under the field the settings name the listed paths missing from the repository's working copy on
this computer, since a worker only gets what lies there (
repo_worktree_files_missing; nothing while there is no working copy). - They are looked up, placed and sent with the issue's own inputs on every start, resolver run and move, by the same rules and limits; what both name counts once.
- A file named like a credential is taken only when the list names its exact path (
.env, not the folder holding it). It then reaches worker machines too: list it only when every worker may read it. Logs name counts, never paths or contents.
Lookup on the main host#
The dispatcher resolves the named inputs when a worker starts (begin), in the main host's
working copy of the repository (the copy worktrees are cut from, local_copy):
- A path must exist, lie inside the copy after resolving it (
canonicalize), and not be a symlink. Folders are read to a depth of 32; symlinks,.gitand nested repositories inside them are skipped. - What git tracks is in the worktree anyway and is left out (
git ls-files). - A file named like a credential (
.env*, keys, key stores,credentials.json, the agents' own sign-in files, anything in.ssh) is never an input, unless the repository's list of files for every worker names its exact path (see below). The worker's brief names what was left out, so it can say so instead of guessing. - Limits: at most 20,000 files and 1 GiB for a worker machine (
MAX_FILES,MAX_TOTAL_BYTES). A worker on the main host gets every file (only the file count cuts).
Where the inputs land#
- A file git ignores keeps its path, so the worker finds it where the issue says.
- Anything else (a session transcript, an untracked file outside an ignored folder) lands below
.gitoodo-inputs/(sessions/<uuid>.jsonl,files/<path>). That folder holds a.gitignorewith*, so it ignores itself and everything in it. - So no input ever shows in
git statusor ends up in a commit. A file already in the worktree stays as it is (a restarted worker may have changed it).
Transfer to a worker machine#
Over the satellite connection the repository copy already uses (satellites.md, "Own copies"),
right after the copy and before the spawn:
- The main host packs the inputs into one archive (8-byte length, a JSON list of
{dest, size}, then the bytes) in a temporary file and computes its SHA-256. inputs_receive(Request::InputsReceive {cwd, size, sha256}) is followed by the archive in chunks of 512 KiB (base64), as for the copy.- The worker machine checks the size, the checksum, every path (relative, no
.., no.git, no drive letter, no duplicates) and that the sizes add up, and unpacks into its staging folder (<state>/inputs/<hash of the worktree path>). The worktree does not exist yet. spawncreates the worktree as before and then moves the staged files in (satellite.inputs_placed). Staging left behind by a start that never came is removed after a day.
The worker machine never reads a path of the main host and never asks for a file: it only takes what the main host sends. The token is in no archive, frame or log line; logs name counts and sizes, never file contents.
When the inputs cannot go there#
- Too large for a worker machine, or the transfer fails (
RemoteStart::Inputs): the start there ends without a machine fault (dispatch.inputs_local), the lease is released and the issue gets the labelhost:<this computer>, the same label a person sets to pin an issue to a machine. It then runs on the main host, which has the data. The label stays visible on the forge and is removed like anyhost:label. - A worker machine taking up its update first (
outdated) is held as for the copy; the issue starts where there is room.
Resolver runs and moves#
A resolver run on a stuck issue and a run moved to another machine for its desktop tests get the
same inputs as the issue's first run (#1585): copied into the worktree here, or sent along to the
worker machine. A set too large to send is left out there; the brief then says to hand the issue
back with gitoodo worker needs --data.
Fetching more while the worker runs#
gitoodo worker input PATH copies a further local file or folder of the main host into the
worktree: a path relative to the repository, or a session transcript <id>.jsonl, by the same
rules as in an issue body (#1584), or a log file of Gitoodo (log:dispatcher.jsonl, #1411).
- A worker on the main host asks the dispatcher's broker, which looks the path up in the working copy and copies it in.
- A worker on a worker machine asks its satellite service, which forwards the request on the main
host's subscription (
Reply::InputForward, likegitoodo worker context). The main host checks that the machine holds the issue's lease, looks the path up, sends the files over a connection of its own (inputs_receive, as at the start) and confirms (Request::InputDone); the service then places them in the worktree and answers the worker (Reply::Delivered). - What is not there, is a credential or is larger than a worker machine is sent comes back as a reason the worker can act on; nothing is copied.
Data is never a missing command#
A worker once reported missing data as a missing command (gitoodo worker needs --tool youtube-research-data). The issue got a tool: label no machine could ever satisfy and waited
for a person. Three things keep that from happening again:
- **
gitoodo worker needs --data PATH --reason "why"** hands the issue back for local files: from a worker machine the issue goes to the main host (host:label, resultneeds_data) and never gets atool:label. A worker on the main host is not handed back at all: the broker copies what it finds and tells the worker to go on without the rest.--datatakes the same paths asworker input, so a word likeyoutube-research-datais refused there as well. A log of the main host counts as data too:needs --data log:dispatcher.jsonlhands an issue that needs the production logs to the main host, where an absolute path like~/Library/Logs/<id>/dispatcher.jsonlwould be refused and the worker would be stuck (#1411). - Main host first for unknown commands: a
--toolhand-back from a worker machine for a command that no machine is known to have (this computer is probed afresh, worker machines by their last probe) also goes to the main host instead of becoming atool:label (needs_here). The person's own computer has their files and their setup; only when a worker there hands the issue back for the same command does it get the label, and with it the "Install it or run without" line on "Asked of me". Hand-back marks still end after 24 hours. - The brief says that
--toolnames programs only, never data, files or folders, and namesworker inputandneeds --data.
What the worker is told#
Every worker brief carries the rule (brief::INPUTS_RULE): Gitoodo copies the files the issue
names before the start; never ask a person to copy files onto this machine; a named file that is
missing was not found on the main host either, so do what is possible without it, say so in the
result and ask only how to go on without it. When there are inputs, the brief starts with a
section Local inputs that lists each one with its place in the worktree, size and file count.