← Back to Plugins
Tools

Task Tether

SaulBurgos By SaulBurgos 👁 22 views ▲ 0 votes

OpenClaw plugin: link chats and their spawned sessions to a task folder and point every turn to it.

GitHub

Install

openclaw plugins install npm-pack:<path-to>/openclaw-task-tether-0.2.0.tgz

README

# Task Tether

An OpenClaw plugin that ties a chat, and the sessions it starts, to a task
folder. Every turn of those sessions is told the task ID and the folder's
absolute path, even when the agent's harness starts a fresh thread that has
forgotten earlier reads.

## Requirements

- Qualified on OpenClaw 2026.11.5 (see qualification/openclaw-2026.11.5.md).
  The package allows installing on later versions; rerun the checks under
  "Testing" after an upgrade.
- Node as required by OpenClaw.

## Install

```bash
openclaw plugins install npm-pack:<path-to>/openclaw-task-tether-0.2.0.tgz --force --accept-capabilities
openclaw config set plugins.entries.task-tether.hooks.allowConversationAccess true
```

OpenClaw 2026.11.5 needs `--accept-capabilities` to install this plugin. The
hook permission is named `allowConversationAccess` in 2026.11.5, not
`allowPromptModification` as newer docs say. Leave `allowPromptInjection` at
its default (on).

## Configuration

One optional setting:

- `tasksDir` (absolute path): where task folders are created. Default:
  `<workspace of the agent where the command ran>/work/tasks`.

## Commands

- `/tasktether <ID>`: start task `<ID>` in this chat and create its folder.
- `/tasktether`: show this chat's task.
- `/tasktether close`: close the task for every session linked to it. The
  folder is kept.
- `/tasktether purge <ID>`: permanently remove a closed task's record and
  every link to it from the plugin's storage. Works from any chat; refuses a
  task that isn't closed. The folder is never deleted. A purged ID can be
  started again once its old folder is deleted or renamed.

IDs are 1–64 letters, digits, dots, dashes or underscores, starting with a
letter or digit. `close` and `purge` are reserved. IDs that differ only in letter case are
the same task.

The commands work in Gateway chat (Control UI) and channels, not in
`openclaw agent --message`. If `/tasktether <ID>` reports a failure or "still
starting", run it again: it resumes where it stopped.

## Example

Say a ticket `BUG-42` comes in. In the chat with the agent that will own it,
type:

```text
/tasktether BUG-42
```

The plugin creates the folder and replies:

```text
Task BUG-42 started in this chat. Folder: /Users/you/.openclaw/workspace/work/tasks/BUG-42. Every turn here, and in sessions started from here, will point to it.
```

From now on, every turn of this chat, and of any session it starts with
`sessions_spawn`, gets these lines in its system context:

```text
Task: BUG-42.
Task folder: /Users/you/.openclaw/workspace/work/tasks/BUG-42
Before acting on this task, read the files in the task folder; they record its current state and next step.
```

The agents keep their notes, plans and handoffs in that folder, so a fresh
thread picks up where the last one stopped. What goes in the folder is up to
your agents' instructions; the plugin only creates it.

When the ticket is done:

```text
/tasktether close
```

```text
Task BUG-42 closed. Its sessions no longer get the task pointer. Folder kept: /Users/you/.openclaw/workspace/work/tasks/BUG-42
```

Later, to clear its record from storage (the folder stays):

```text
/tasktether purge BUG-42
```

## Who can run /tasktether

Any sender OpenClaw authorizes for the chat (`requireAuth` is on). The plugin
adds no restriction of its own: an authorized sender can start a task in any
agent's chat, and close it from any chat linked to it. On a single-owner
Gateway that is the owner. Gateways with several senders should restrict chat
access with OpenClaw's own settings.

## How it works

- A `before_prompt_build` hook adds three lines to the system context of every
  turn of a linked session: the task ID, the folder path, and an instruction
  to read the folder first. The hook runs twice per turn and logs one line per
  hook call with the task ID, session key, run ID and input origin.
- A session spawned from a linked session links itself on its first turn, if
  its session entry names that parent (`spawnedBy`) and its `createdAt` is at
  or after the task's. It logs one `linked` line.
- Tasks and links live in the plugin's retained keyed stores `tasks` and
  `session-links`, with hashed keys and conditional updates. Each start gets a
  random reservation ID that its links and folder marker carry. From 0.1.1,
  each link row also records the chat's session key in plain text, so the
  storage can be read without hashing; links written by 0.1.0 lack it and
  keep working.
- The folder holds a `.task-tether.json` marker. An existing empty folder is
  adopted; any other existing folder, a symlink, a file, or a folder whose
  marker doesn't match is refused.

## Limits

- One task per chat. A closed task can't be reopened, and its ID can't be
  reused.
- A new chat needs its own `/tasktether`. Sessions created before
  `/tasktether` ran don't join the task.
- A spawned session that runs `/tasktether` itself before its first turn
  claims its own task. The intended use is that the owner starts tasks in the
  lead chat.
- Links of deleted sessions stay in storage until their task is purged.
- What uninstall does to stored tasks is unknown; a reinstall may still know
  old task IDs.
- Only sessions started with `sessions_spawn` (visible or hidden) join a task.
  A session started with `sessions_create` has no parent, so it doesn't join.

## Testing

```bash
npm run check                                            # build and 40 Vitest tests
openclaw plugins inspect task-tether --runtime --json | node scripts/check-inspect.mjs
openclaw plugins lint --root . --json
```

`plugins lint` on 2026.11.5 scanned 19 files and reported no warnings
(`qualification/lint-2026.11.5.json`).

## Uninstall

```bash
openclaw plugins uninstall task-tether --force
openclaw config unset plugins.entries.task-tether
```

## License

MIT. See [LICENSE](LICENSE).
tools

Comments

Sign in to leave a comment

Loading comments...