Environment and Schedule Commands
Two features that allow you to control Pulse not only from the window: environment teams for external agents (via Pulse MCP server) and schedules for timed launches. Both go through the same facade of operations as the window and the phone: the same license and budget checks, the same entry in the request register with a receipt, the same line in the activity log. There is no workaround where something is done “bypass”.
Environment commands
Previously MCP server Pulse (mcp/pulse-mcp.cjs, Settings → Integrations → MCP server) could only read tasks from files and execute git commands. Now he has two new tools:
| Tool | What does |
|---|---|
pulse_commands |
List of commands running Pulse: schema version, names, fields, which commands change the state; host.bootId - Pulse launch (changed - receipts from the previous launch are no longer a promise, see. docs/recovery.md) |
pulse_command |
Run the command: { name, input, idempotencyKey?, actor? } → result or failure with code |
How it works: Pulse, when launched, raises a local HTTP bridge to 127.0.0.1 with a random port and token (the same service through which external agent hooks announce themselves); the address and token are in the discovery file $TMPDIR/pulse/agent-<pid>.json. The MCP server finds the live file and contacts the bridge with the token. Pulse is not running - commands are not available, but task reading and git continue to work on files.
Discovery file - secret: directory pulse created with rights 0700, file - 0600, and readers (hook mcp/pulse-agent-hook.sh and the MCP server itself) trust only their user’s files (uid check) with a live pid and valid port/token; JSON parsing is done through node, not sed - the crooked file will not replace the values (audit 24.09, #226/#338).
Individual tool limitation git_commit (audit 24.09, #231): commits are allowed only in working copies of Pulse tasks (worktreePath from pulse_tasks_list) and in cwd
sessions (their own copies of the swarm participants), comparison - using realpath. A commit in an arbitrary directory is rejected with an explanation.
List (scheme v1)
| Team | Changes | Meaning |
|---|---|---|
commands.list |
no | schematic version and list |
tasks.list |
no | task board |
sessions.list |
no | sessions of all tasks or one |
session.events |
no | session feed page by cursor |
requests.get |
no | registry entry by requestId: whether the command was accepted and how it ended |
task.create |
yes | new task in the connected repository (only from Settings → Repositories), by default with the start of the first session |
session.create |
yes | new session in task |
session.prompt |
yes | turn into an existing session; answer - receipt with turn number |
session.cancel / session.stop / task.cancel |
yes | interrupt the turn, extinguish the agent, interrupt the task |
task.workflow |
yes | task stage: backlog, in_progress, review |
notes.read |
no | task note - file .md note storages (Obsidian format); secrets - behind the mask |
notes.append |
yes | add Markdown to the end of the task note (up to 20,000 characters); secrets are masked before being written, a line in the log |
What is not on the list intentionally: acceptance of the result, integration and deletion of tasks. These are the decisions of the man in the window; the agent cannot set the task to “accepted” in a roundabout way.
The agent only reads and appends notes (M11.14, architect's decision): erasing or rewriting a note or writing to other storage files is not possible. This is the only way for the agent to write outside the working copy, and it is narrow: one task file, at the end, without secrets, with a log.
Receipts, repetitions, refusals
- Each changing command receives an entry in the request registry (
source: mcp) with receipt and outcome;requestIdis returned in the response and readrequests.get. idempotencyKeyfortask.create,session.createandsession.prompt: repeating with the same key does not create a second task and does not start a second turn, but returns the same result (repeated: true). The key for which the command is still being executed gives a “still executing” refusal.- Refusals are returned with the code:
bad_request,not_found,forbidden(repository not connected),license_required,budget_exceeded,unknown_command,unavailable(bridge not raised)internal. Refusals are also written in the journal. - The activity log ("Environment Command" view) shows the source, action and outcome: "MCP (claude): prompt to session "..." accepted, turn 7."
Schedules
Settings → Schedules. A schedule is a task for an agent that Pulse launches itself at a designated time: daily review of open PRs, nightly update of dependencies, regular testing of tests on a fresh branch.
Schedule fields:
| Field | Rule |
|---|---|
| Repository | only from connected ones; the task is created with its own working copy |
| Agent, profile, task | like a normal task |
| When | “at a given time” (hours: minutes and days of the week; empty - daily) or “every N minutes” (no more than once every 5 minutes) |
| Time zone | IANA name (Europe/Moscow); is stored in the schedule, and is not taken from the machine at startup - moving the laptop to another zone does not shift launches |
| Pre-check | command in repository; return code 0 - run, otherwise skip with the reason “the check said “there is nothing to do”” and the output in the history. A cheap way to avoid paying an agent for an empty launch |
| Launch budget | cost limit for a created task |
| What to run | “new task” (default) or “continue previous session” are clear choices because in the second case the agent is running in the old working copy |
| Missed launch | Pulse did not work at the appointed time: “skip” (entry in history) or “execute once” at startup - but no later than 12 hours and never several times in a row |
Rules that always apply:
- One launch per schedule at a time. The previous task is still running - the new launch is skipped with the reason “the previous launch is still running.”
- The next time is counted from the moment of launch, and not from the planned one: there are no catch-up series.
- License and budget are checked by the same facade as in the window: refusal - a pass with the reason “no license” or “budget exhausted”.
- "Run Now" performs off-schedule schedules (even when turned off), but with the same occupancy checks and pre-checks.
- Each outcome - launch, omission with a reason, error - goes into the schedule history (last 50) and into the activity log (Schedule view). The created task opens from history.
- Schedule runs go through a query registry with a source
schedule.
Limitations: schedules work only while Pulse is running (continuous execution without an open application is a separate stage); minute accuracy - scheduler tick every 30 seconds.
Scheduled run on the repository itself
The schedules above are a product feature: Pulse runs an agent on the user's repository while Pulse is open. Night reviewer - different: this is a run-through above the Pulse repository itself, in GitLab checkouts, without the app open. The difference is practical: the product schedule lives as long as the window lives (see “Limitations” above), and the GitLab schedule does not depend on the owner’s machine at all. This is maintenance of the Pulse repository in CI, and not remote execution of a human task: it is not yet possible to set a executing machine for your task and monitor its progress from another computer. The conditions for such acceptance are written down in protocol of two machines.
What it does: takes changes main per day, shows their models by the same reviewer as on merge requests (device and its boundaries - Quality), and puts the report as a run artifact. In the morning, the report is opened from the task.
What it doesn't do and why:
- Doesn't create tasks or open merge requests. The right to change something from the outside is exactly what the reviewer does not have by design; and the stages that lead to such a right run into the returning gate.
- Doesn't comment. No destination: The merge request does not exist in the night run.
- Doesn't run full checks. At night only the reviewer is executed:
mainhas already been tested by the push that moved him, but the runners are their own and their time is not endless.
There is no schedule itself in the repository intentionally. It is launched in GitLab (Build → Pipeline schedules, branch main) and is a decision about regular spending: each night run is a request to the paid model. This decision is made by the owner, not the file in the repository. While the schedule has not been created, the task night reviewer it just never starts - and this can be seen by the lack of runs, and not by the green checkmark.
That reviewer rejection costs nothing is not a promise, but a proven fact: end-to-end review (src/shared/ciReviewScript.test.ts) runs the entire script against the fake model server on the loop and makes sure that for each of the five failure modes it does not receive a single request. The reasoning “the decision function does not do I/O” is not enough for this: between the decision and the request there is main(), and lose there return - one line edit.
A side benefit of this road: the night run goes to main, and main - protected branch. So it works with protected key variable, that is, in the configuration option where the merge request reviewer does not work at all. Analysis of this choice - in
Quality → Reviewer in checks.
I’m being as honest as I can about the cost of Pulse here: he doesn't know the cost of the run — each provider has its own and changes. He knows the size: the budget limits the diff by bytes and number of files (PULSE_REVIEW_MAX_BYTES, PULSE_REVIEW_MAX_FILES), and the report includes consumption in tokens according to the model itself; if the model didn’t mention it, it’s written like that – “the model didn’t report the consumption.” This is not translated into money anywhere.
What's where in the code
| Layer | File |
|---|---|
| Reviewer in checks: decision to launch, budget, prompt, disinfection | src/shared/ciReview.ts |
| Reviewer: git, model request, comment | scripts/ci/review.mjs |
| End-to-end reviewer verification: whole script against fake models and GitLab | src/shared/ciReviewScript.test.ts |
Quests reviewer and night reviewer |
.gitlab-ci.yml |
| List of commands, circuit version, input check | src/shared/commands.ts |
| Service commands: receipts, audit, idempotency | src/main/commands/service.ts |
Local Bridge (GET /commands, POST /command) |
src/main/agents/externalStatus.ts |
| MCP Server Tools | mcp/pulse-mcp.cjs |
| Schedules: time rules, storage, scheduler, precheck | src/main/schedules/{spec,store,runner,precheck}.ts |
| Types of schedules | src/shared/schedules.ts |
| Settings page | src/renderer/src/components/settings/SchedulesPage.tsx |