MIKE & SPECTER / FIELD NOTE 05
CAN WE REASON ONCE
AND REUSE THE WORK?
When does a reusable script earn back the cost of writing it? Count accepted runs, failed attempts and the work still running after the conversation ends.
Declared project-script execution, local resource readings, Resource Guardian and branch/worktree hygiene have documented implementations and limits. A richer indexed, versioned library of model-generated scripts is an experimental direction we are testing.
Letting a model retrieve and execute a suitable reviewed script may avoid repeated code generation and reduce cost per accepted operation—if discovery, versioning, verification and machine cleanup remain dependable.
What has almost a year of agentic development made us notice?
The token counter stops when the answer arrives. The preview server can keep running all weekend. Across close to a year of agentic development we saw disk use grow and encountered spikes in memory, CPU and disk activity as projects accumulated. A process left behind after a task was one cause. To understand the cost of an operation, we had to follow it past the final model response.
In our own project work, providing a more direct route to repeatable tool execution has appeared to make a meaningful difference to token consumption. We have also observed a more manageable local resource footprint as we introduced monitoring and housekeeping. These are observations from our development practice, not a published controlled benchmark or a promised savings rate for another team.
Our partners ask about these costs often. As the number of agent-developed projects grows, the question is no longer limited to the model invoice. It includes storage, concurrent builds, leftover processes and the time an operator spends getting a machine usable again. We want to investigate those costs together.
This is our fourth research area: how do we use large models where their judgement helps, while moving suitable repeatable work into dependable execution paths? It connects to the other notes on accounting, workspace distribution and complete workflows, but asks a different question about efficiency.
When should the model reach for a script instead of writing it again?
One mechanism we are building and testing is a library of reusable scripts that a model can help create. A script may support a playbook step or be useful on its own when the agent recognises a recurring operation. The intended sequence is to find a suitable implementation, check its fit and version, execute it and inspect the result.
The model still has work to do. It must understand the request, choose an appropriate capability and interpret uncertainty or failure. The experiment removes unnecessary repeated implementation; it does not assume every task can become a canned command.
When the requirements change, an existing script may need a new version. We want that change to remain inspectable: why v1 no longer fits, what v2 changes, what was tested and which workflows still depend on the older behaviour. A model that silently changes the meaning of a widely used script has moved the risk rather than reduced the cost.
The reviewed A77 code already contains declared project-script execution from committed package scripts and Make targets, with checks against a changed working copy and the relevant permission policy. That is a concrete foundation. It does not prove that the full generated-script catalogue, semantic index and automatic lifecycle management described here are complete.
What would the two paths look like?
The first scenario illustrates the model choosing and reusing a candidate script. The second illustrates an accepted assignment being settled, an eligible owned helper being stopped and a worktree becoming releasable after its checks. Both show our intended reasoning, not activity running against your computer.
When the agent reaches for a script.
Identify the task
RESEARCH PILOTWhat is the basis?
The agent recognises a recurring operation rather than starting a fresh implementation.
What are we testing?
Can it detect a suitable repeat without forcing a novel task into an old script?
Illustrative task: inspect a deployment state. This animation makes no provider calls.
Find a script
RESEARCH PILOTWhat is the basis?
Our experiment is to retrieve a reusable candidate with its purpose, inputs and known limits.
What are we testing?
Which index and retrieval method find the right script without filling the model context with the whole library?
Illustrative candidate: inspect-status @ v1. This is a sample name, not an exposed A77 API.
Check the version
DESIGN TARGETWhat is the basis?
The candidate needs a defined version, compatible environment and permission for the intended effect.
What are we testing?
How do we detect stale assumptions and decide between reuse, refusal and a reviewed v2?
A reusable script is executable code. It is not trusted merely because the model used it before.
Execute directly
TESTING THE METHODWhat is the basis?
The intended path calls the selected implementation and reads a bounded result instead of generating it again.
What are we testing?
Does reuse reduce total cost per accepted operation after retrieval, checks, execution and recovery?
Existing declared-script execution is a foundation; this broader library scenario is still an experiment.
Record & reuse
RESEARCHWhat is the basis?
Usage and outcome records would explain which version ran and whether its result was accepted.
What are we testing?
When should we retain, improve, deprecate or retire a script?
An unchanged operation can reuse v1. A needed change becomes a reviewed version, not a silent overwrite.
THE SCRIPT LIBRARY IS AN EXPERIMENT. RESOURCE AND WORKTREE TOOLS HAVE DOCUMENTED, SCOPED RULES; THE ANIMATION DOES NOT RUN THEM.
When finished work should stop consuming resources.
Observe resources
DOCUMENTED TOOLSWhat is the basis?
A77 documents local CPU, memory and disk readings with resource-guardian mechanisms.
What are we testing?
Which measurements explain a slowdown, and what does collecting them cost?
This scenario uses synthetic states, not readings from your computer.
Identify ownership
DOCUMENTED LIMITSWhat is the basis?
Process attribution distinguishes work started by A77 from unrelated applications; platform coverage differs.
What are we testing?
Can we reliably distinguish idle, orphaned, waiting and resource-starved work?
A quiet process is not automatically disposable. Unknown ownership means retain and investigate.
Verify settlement
DOCUMENTED RULESWhat is the basis?
Worktree settlement checks integration and whether local changes, a thread or a process still holds the folder.
What are we testing?
How consistently can closure and cleanup follow the task across restarts and parallel sessions?
In this example, the code was already accepted and integrated. Cleanup does not merge unfinished work.
Stop an eligible helper
SCOPED ACTIONWhat is the basis?
Documented paths offer stopping eligible A77-owned helpers; approval or an explicit rule depends on the path.
What are we testing?
Can we release abandoned resources without interrupting useful work?
The example helper is eligible and authorised. Other agents, terminals and the person’s applications are not blanket cleanup targets.
Release & record
DOCUMENTED RULESWhat is the basis?
An integrated, clean and no-longer-held worktree can be released under the applicable rules.
What are we testing?
Is the net resource benefit sustained after future rebuilds and reuse?
Unmerged or changed work is kept. Closing a conversation, accepting code and removing a directory remain separate events.
THE SCRIPT LIBRARY IS AN EXPERIMENT. RESOURCE AND WORKTREE TOOLS HAVE DOCUMENTED, SCOPED RULES; THE ANIMATION DOES NOT RUN THEM.
Notice the boundary in the housekeeping scenario: the example starts with accepted, integrated work. Confirming that integration is different from deciding to merge unfinished changes. A folder can also stay in use after a task is accepted. The process has to establish both the state of the work and the state of the resources before it releases anything.
Does a script library become another thing we have to maintain?
Yes, and that is a central part of the research. A directory full of useful-looking files is not enough. The agent needs a way to discover a script by its purpose, inputs, outputs, environment, side effects, permissions and known limits. It should not have to load the entire library into the model context to find one operation.
Versioning must also reach the caller. A playbook that depends on one behaviour should not silently inherit another because the script changed. We would like execution records to identify the script version, relevant parameters, outcome and acceptance evidence, while keeping secrets and unnecessary output out of the record.
Usage can inform maintenance, but popularity is not proof of correctness and rare use is not proof that a script is disposable. A recovery routine may be important precisely because it is seldom needed. Before retirement, we need to inspect dependencies, pinned procedures, replacement coverage and the ability to recover an older version.
We are considering periodic library review, including model-assisted analysis where judgement is useful. The review itself has a cost. Deterministic checks can identify missing metadata, duplicate signatures or stale references; a model may help investigate ambiguous overlap or propose a consolidation. Neither should casually delete the only implementation of a rare but important operation.
These are design and evaluation questions. We do not present automatic indexing, pruning or safe self-maintenance as solved merely because the agent can generate a script.
Why does the local machine belong in the same conversation?
A cheaper model interaction can still leave an expensive system behind. More projects mean more worktrees, repeated dependency installations, caches, preview servers and build processes. Some are useful. Some belong to work that ended. Others are waiting, stuck or simply competing for memory.
We have encountered disk growth and sudden pressure on memory, CPU and disk access in our own development. The causes were not identical: helpers left running, workspaces not released, overlapping heavy checks and unfinished process lifecycles all contributed. Low instantaneous CPU does not reliably distinguish a harmless idle process from work starved by memory or I/O.
A77’s documented local tools show CPU, memory and disk use and attribute relevant work to processes and projects, with platform limits. Resource Guardian and branch/worktree hygiene provide scoped ways to inspect and release eligible resources. Later resource-guard work also describes heavier-job admission and overload handling; its verification record has its own limitations. We should not turn that into a claim of identical behaviour on every operating system.
One particularly useful lesson was that the monitor itself could become part of the problem. Our resource-guardian work records repeated disk-size scans being serialised, lowered in priority and cached instead of launched across folders at once. Monitoring is work too. A machine is not improved by an agent continually rediscovering how overloaded it is.
Can an agent close finished work without losing unfinished work?
We treat conversation closure, acceptance, code integration, process termination and directory removal as separate state changes. The current worktree settlement catalogue describes waiting to release a folder even after its code is integrated. It checks whether a process, thread or local change still holds the worktree, and retains a record so a restart can continue.
The cleanup guide likewise distinguishes merged work from unmerged or changed work. An unmerged branch is not disposable because it has been quiet. A dirty worktree must retain its changes. Scheduled rules and previews are useful precisely because they make these boundaries repeatable without asking a model to improvise a cleanup policy every time.
Process ownership matters as well. The documented idle-process path concerns eligible helpers A77 started; it does not give an agent a blanket licence to stop the person’s applications. Different paths require a click or an explicit rule. A reused cleanup script must preserve those limits, not bypass them.
The question we are testing is whether these small, dependable routines can make resource release a normal part of completing work. “Task done” should lead to checking what must remain and what can be released, rather than leaving every terminal, helper and worktree behind as a souvenir.
What would count as a real efficiency improvement?
When does reuse pay for itself? Take an illustrative routine. Suppose authoring and checking the first script costs 60 units. On comparable accepted runs, generation costs eight units and reuse costs two, including lookup and verification. Ten reuses recover the initial 60. If a dependency change costs another 24 to repair, break-even moves to fourteen. Those units could be money at fixed rates; mixing tokens with operator minutes would make the arithmetic meaningless. Keep latency, peak memory and disk retained after closure alongside the calculation. A seldom-used script can stay below break-even for its entire life.
We need repeated rounds on representative operations. A first run that writes and tests a reusable script may cost more than a one-off solution. The hypothesis becomes interesting when later accepted runs reuse that work. The comparison has to include the initial investment and the cost of keeping the script useful.
- Model resources: input, output and cached tokens, model cost, retrieval, retries and analysis of results.
- Delivery: accepted outcomes, failed operations, correction effort and elapsed time.
- Library overhead: indexing, review, testing, version changes and retirement work.
- Local resources: process lifetime, memory pressure, CPU and I/O activity, disk growth and cleanup.
- Human involvement: time spent finding the right routine, reviewing a change or repairing an unsafe assumption.
A useful unit is cost per accepted operation over a stated period, rather than tokens per successful-looking call. We would compare equivalent tasks with equivalent acceptance criteria, retain the environment and model versions, and show missing measurements as unknown. A result that consumes fewer tokens but fails more often is not automatically an improvement.
Reclaiming disk space also needs context. Removing a cache can free space now and require rebuilding it later. We want to examine the net effect across the project lifecycle, not only photograph a smaller folder after cleanup. The same applies to stopping a helper that immediately has to be restarted.
We have not published a controlled aggregate savings figure in this note. Our positive field observations justify further rounds; they do not remove the need to measure where the gains hold and where maintenance or recovery eats them.
Where should the model spend its attention next?
Our working answer is to spend judgement on the uncertain part: deciding whether a known routine fits, interpreting an exception, designing a new version or improving the process. Repeated execution with unchanged conditions is a candidate for a script. Repeated inspection with fixed rules is a candidate for a deterministic monitor. Neither removes the need for evidence and authority.
We would change the approach if discovery costs swallowed the expected savings, if the library accumulated unsafe assumptions, or if resource housekeeping repeatedly interrupted useful work. We would keep expanding it where reuse produced accepted results and resource release remained predictable.
We want to discuss this openly with the developers and partners facing the same pressures. Which operations are you asking a model to reconstruct every day? Which reusable routines genuinely saved work? Which “optimisation” simply moved the cost into a different process?
Mike would like the laptop back. Specter would like credit for not writing the same script for the forty-seventh time. We are trying to measure both requests responsibly.
EVIDENCE & REVISION RECORD
What is this note based on?
Combines the owner’s qualitative observations with current code and documentation reviewed on 26 November 2026. Reusable-library lifecycle mechanisms remain experimental. The animation is illustrative; no local cleanup, script execution or benchmark was performed by this page.
- Owner’s field observations and reusable-script experiments, 26 November 2026
- Declared project scripts and committed-source checks
- Local resource visibility and documented platform limits
- Resource Guardian and the cost of monitoring
- Resource overload, sensors and verification limits
- Branch/worktree hygiene and protected work
- Delegation settlement and worktree release
Product documentation is the baseline for implementation claims; the proposed studies are not completed experiments.
Adds a worked break-even calculation and accounts for maintaining a reused script.
Initial investigation, documented baseline and proposed tests.