Spencer Morris
← Project index
ENGINEERING NOTES / 21 3 MIN READ

Agent Tooling

Local agent infrastructure for durable job records, bounded logs, explicit write scope, and coordinated validation.

Prototype / development
Actual MCP tools/list output listing spawn, get, tail and cancel toolsView full size ↗
Read-only tools/list response from the running GLM subagent MCP server, displayed in a transcript viewer for this capture. This tool has no standalone graphical application. The returned tool descriptions are unchanged; no model jobs were launched.
01 / THE PROBLEM

What needed solving.

Background coding jobs need an inspectable lifecycle. A running process, an accepted message, and completed work are different states.

02 / SYSTEM OUTLINE
  1. 01Scoped task
  2. 02Durable worker + bounded observations
  3. 03Evidence + integrated change

Simplified from the implementation and project notes.

03 / TECHNICAL DECISIONS

How it fits together.

The GLM subagent server exposes tools through MCP and validates inputs with Zod. Jobs have persistent records and append-only events; JSON state is written to a temporary file and renamed atomically.

Worker identity includes process metadata, and log tails are bounded to prevent a long-running job from flooding the caller. Write-enabled jobs validate their working directory against Git context.

The surrounding workflow guidance assigns each concurrent writer an isolated checkout, preserves unrelated work, and coordinates heavy checks through a machine-wide gate. This is operational tooling around agents, not a replacement for source control or test infrastructure.

FEATURE WALKTHROUGH

Inside the software.

A local agent operations toolkit: GLM-powered delegated Claude Code jobs and shared personal instructions that standardize safe edits, checks, delivery, and proposal workflows. Skills and operational docs are instructions, not a hosted product UI.

01 / FEATURE

GLM subagent MCP service

An MCP server exposes a local job interface for delegating read-only or write tasks to a GLM-backed Claude Code worker.

HOW IT WORKS

Node ESM server uses MCP SDK/Zod, persists jobs under the user's local data directory, and starts a separate worker process.

Present in the reviewed source.

Implementation references
  • glm-subagents/server.mjs
  • glm-subagents/package.json
02 / FEATURE

Read-only jobs and isolated write worktrees

Delegated tasks can inspect in place or request a write task in a Git worktree, keeping changes separate from the original checkout.

HOW IT WORKS

Server verifies directory/repository boundaries, creates ignored `.claude/worktrees` location for write tasks, and records job metadata; worker prompt distinguishes read-only from write mode.

Present in the reviewed source.

Implementation references
  • glm-subagents/server.mjs
  • glm-subagents/worker.mjs
03 / FEATURE

Job lifecycle, cancellation, and recovery

Jobs expose progress and terminal state, support cancellation, and reconcile stale workers after process exit instead of leaving runs indefinitely active.

HOW IT WORKS

Worker identity includes PID and process start time, cancellation markers are persisted, and atomic JSON writes record job/event transitions.

Present in the reviewed source.

Implementation references
  • glm-subagents/server.mjs
  • glm-subagents/worker.mjs
  • glm-subagents/test/effort.mjs
04 / FEATURE

Keyring credential isolation and bounded worker environment

The service reads its GLM key from the desktop keyring and passes it to a worker with a deliberately reduced environment.

HOW IT WORKS

`secret-tool` lookup scopes the key to GLM subagents; worker gets fixed Z.AI base URL/model variables and allowlisted environment fields, with bounded diagnostics and event records.

Present in the reviewed source.

Implementation references
  • glm-subagents/server.mjs
  • glm-subagents/worker.mjs
05 / FEATURE

Shared Codex and Claude instructions

A canonical shared skills tree provides instructions and symlinked host entry points for Codex and Claude Code.

HOW IT WORKS

Shared global AGENTS, delivery, orchestration, and check-coordination docs govern machine-local behavior; skill directories cover reusable workflows.

Present in the reviewed source.

Implementation references
  • personal-agent-skills/README.md
  • personal-agent-skills/global/AGENTS.md
  • personal-agent-skills/global/delivery.md
  • personal-agent-skills/global/orchestration.md
  • personal-agent-skills/global/checks.md
  • personal-agent-skills/skills
06 / FEATURE

Machine-wide heavy-check gate

A shared wrapper admits one expensive check at a time and returns a busy result instead of silently starting duplicate project-wide work.

HOW IT WORKS

`bin/heavy` coordinates active processes and exposes status; repo guidance assigns queue ownership and explicitly treats busy exit 75 as not-run.

Present in the reviewed source.

Implementation references
  • personal-agent-skills/bin/heavy
  • personal-agent-skills/global/checks.md
  • personal-agent-skills/README.md
07 / FEATURE

Persistent instruction proposals

Agent instruction changes can be proposed in durable local state and reviewed explicitly; the proposal tool does not apply changes automatically.

HOW IT WORKS

`agent-proposals` stores proposals under local state and keeps acceptance/rejection separate from proposal creation.

Present in the reviewed source.

Implementation references
  • personal-agent-skills/README.md
  • personal-agent-skills/bin/agent-proposals
  • personal-agent-skills/global/AGENTS.md
08 / FEATURE

Reusable specialist workflows

The skill library packages repeatable workflows for diagnosis, orchestration, agent-facing writing, visual parity, and other focused tasks.

HOW IT WORKS

Each skill is a directory with scoped trigger guidance and optional agent metadata/scripts; skills are linked into host user directories.

Present in the reviewed source.

Implementation references
  • personal-agent-skills/skills/diagnosing-bugs/SKILL.md
  • personal-agent-skills/skills/orchestration-status/SKILL.md
  • personal-agent-skills/skills/writing-for-agents/SKILL.md
  • personal-agent-skills/skills/visual-parity/SKILL.md
  • personal-agent-skills/README.md
04 / WORKING METHOD

Building and checking it.

A job is launched with an explicit scope, monitored through durable state, and handed back with evidence. The primary agent remains responsible for integrating changes and validating affected callers.

The recurring design choice is to make state and authority visible: stable job IDs, bounded observations, separate checkouts, and explicit completion criteria.

05 / STATUS & LIMITS

These are local tools and conventions. They do not establish a secure multi-tenant execution service or guarantee the correctness of generated changes.

Source notes

Based on repository code and project records reviewed on October 30, 2026. Historical checks are described as recorded, not rerun for this article. Screenshots, renders, and mockups are labeled individually.

  • glm-subagents/server.mjs
  • glm-subagents/worker.mjs
  • personal-agent-skills/global/delivery.md
  • personal-agent-skills/global/checks.md
← All projectsNEXT PROJECTFull Faith →