Skip to content

About

Hand a bounded task to another coding agent, keep the run, and read what it did.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

agent-delegate

Hand a bounded task to another coding agent, keep the run, and read what it did.

A task handed from one coding agent to another usually lives and dies with the session that started it, and nobody else can tell whether it is still running or what it found. agent-delegate launches a coding-agent CLI (Claude Code, Codex, Pi or OpenCode) as a detached run and prints a handle. Another session on the same machine can use that handle to wait for the run, read its conversation, resume it or cancel it, change its model or effort while it works, and steer it while it runs on Claude Code, Codex or Pi.

The caller names the model and effort, or leaves them to the backend's default. With agent-routing on PATH, a routing profile picks them instead and a prohibited model tier is refused before anything starts.

A run is plain files in a state directory. Under a systemd user manager each run has its own scope and memory limit, so closing the terminal or the harness that started it does not stop it, and a run is checked against a memory budget before it starts. A launch that does not fit returns a handle and waits in the host admission queue; --no-wait requests an immediate refusal. agent-delegate admission shows the queue and host caps; agent-delegate admission caps backend pi 2 retunes a cap without restarting runs.

Install

cargo install --git https://github.com/11xx/agent-delegate --locked

Linux only. A systemd user manager gives each run its own scope and memory limit. Without one, what bounds a run depends on the host, down to a limit that is only checked at launch, and a run can end with the control group of the process that started it. From a checkout, run cargo install --path . --locked; the pinned toolchain is Rust 1.97.

At run time it needs the CLI of each backend it is asked to use, already signed in.

Hand off a task

Write the task to brief.md. run prints the handle the other commands take.

agent-delegate run --profile implement --backend codex \
  --repo . --brief brief.md            # starts the run, prints its handle, returns

agent-delegate exchange HANDLE         # its prompts and messages so far
agent-delegate exchange HANDLE --tools # with reasoning and tool calls
agent-delegate follow HANDLE           # prose plus lifecycle status; --tools for detail
agent-delegate dash                    # conversation, t tools, Q admission
agent-delegate steer HANDLE --message "Cover the empty input too."
agent-delegate reroute HANDLE --variant VARIANT   # another model or effort, same work
agent-delegate wait HANDLE             # block until it ends, print its last message
agent-delegate status HANDLE --json    # inspect message/typed absence without collecting
agent-delegate resume --brief next.md HANDLE   # continue the same backend session

--profile names the shape of the work, its sandbox and lifecycle, and --backend the CLI that does it. Without agent-routing, --model and --effort go to the backend as given and the backend's default runs when they are left out; with it, the profile resolves the model, a named one is validated, and --variant picks another route of the profile (Routing). --memory-max 8G asks for that limit, --arc --change ID records the dispatch in arc, and cancel HANDLE stops a run.

A run's result is its last assistant message in the backend's native recording. status --json, follow, completion hooks and swarm reports read it through Timeline when asked; an unavailable recording carries a typed reason beside the backend's outcome. Lifecycle records contain process and delivery facts. status puts the result at the top level and leaves it pending for consumers.

See runs as threads in T3 Code

agent-delegate acp t3-provider         # prints a provider entry for T3 Code's settings

With that entry in place T3 Code lists the routes as models, or, without agent-routing, each installed backend. A task delegated to the provider starts a run and appears as a child thread: live output, a Stop that cancels the run, later messages that steer or resume it, and a model change on the thread that reroutes the run. The manual covers what a task can say about its checkout, memory limit and arc change.

Where the rest is

agent-delegate with no arguments prints a one-screen map of what it does. agent-delegate guide <topic> goes into one subject at a time, and every command has --help. docs/manual.md is the reference: run lifetime, memory admission, managed swarms of lanes (swarm), the terminal dashboard (dash), the T3 front and the run store.

Session recordings are read through tapes.

License

Public domain, under the Unlicense.

About

Hand a bounded task to another coding agent, keep the run, and read what it did.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages