An organism is a running Nodecode. There is one per home, and every terminal you open talks to it. Below are five things people do to it, each done two ways.
A second agent
A home has one store, and one process owns it: a nodecode serve that the first shell started. Anything else that wants the store finds it taken.
The organism stops with it. The other shell starts a new one within a second, on the same port, and its turn picks up where it stopped. A value set with setf is gone.
With the background gateway on, the service manager runs the organism instead, and no terminal stops it. See The gateway.
A launch looks stuck
The owner holds a lock on history.db.lock. The operating system frees it when the owner exits, however it exits.
The first organism still holds its lock, on a file that no longer exists. The next launch starts a second organism on the same store, on a new port. Two processes now write one history.
Remember a value
The organism keeps a definition, not a state. A top-level defun or defparameter is written to your layer and loads at every start. Anything else lives only as long as the process.
No editor is set: that value died with the last process. count-lines is still here.
After a restart
Set in this process only. After a restart, boundp says NIL, while a defun from the same hour is still there.
Change a kernel function
The kernel, nodecode.kernel, holds the store, the lock and the loader. The organism locks it at boot. Everything else, the turn loop included, is nodecode.evolved, and the model may redefine it.
or
Defined nlk:home-abbreviated failed
ERROR: SYMBOL-PACKAGE-LOCKED-ERROR: Lock on package NODECODE.KERNEL violated when setting fdefinition of
HOME-ABBREVIATED while in package NODECODE.EVOLVED.
See also:
The SBCL Manual, Node "Package Locks"
First shell
The lock refuses it, and nothing is written to the layer.
One tool, one log
The organism has one tool, eval. A shell command, a file edit and a new definition are each a Lisp form in an eval call.
A turn. A tool call runs as a cell of Lisp in the running image. Its result returns to the round. A turn takes as many rounds as the work needs. Each station writes a durable fact.
Every fact is an event in ~/.nodecode/history.db: a prompt, an answer, a tool call, its result. The transcript in every shell and the model's context are both read from it. History the model no longer sees stays in the log. See Context and recall.
The gateway answers on 127.0.0.1, on the port this store used last. There is no port option. Shells find it in history.db.owner. See Files.