What happened
Anomalyco describes Psychoscript as a confined JavaScript interpreter. Programs are compiled to bytecode and run on a virtual machine without ambient access to the file system, network, processes or timers. A program can interact with the outside world only through host functions supplied by the application. The README positions it for code from a model, user or plugin that should not receive direct access to the host environment, as well as programs that need to remain active across restarts.
The package can be installed with npm install psychoscript or bun add psychoscript. It requires Node 24 or later, or Bun 1.4 or later. Its Promise-based API does not depend on Effect; a separate psychoscript/effect entry point provides an Effect API. A runtime is configured with globals, which can expose individual host functions or namespaces. In the documented example, a program receives a double function and returns a value through runtime.execute. Results use an { ok, value } or { ok, error } shape, alongside logs, warnings and run metadata.
The README’s host-function API makes the boundary configurable. Host.fn can wrap synchronous or asynchronous calls, and asynchronous calls can be marked idempotent when it is safe to run them again. Calls receive a key, cancellation signal and a way to detect suspension. Host.namespace supports lazy resolution of larger tool catalogs; the host can expose only selected paths and return errors with suggestions for unavailable functions. Runtime options include execution timeouts and output-size limits. The documented example sets a 1,000-millisecond timeout and a 64,000-byte output cap.
Psychoscript also supports suspending a run, converting its state to bytes and resuming it. The README demonstrates a program waiting on an asynchronous host call, saving its state and continuing in a later runtime instance. If an in-progress call is marked idempotent, it may run again after resume with the same call key; without that designation, suspension during the call rejects with a SuspendError. Snapshots record the writing build, including package version and a hash of opcodes, prelude, codecs and built-ins. Resuming with another build or malformed bytes rejects with a SnapshotError, and suspend({ maxBytes }) can cap snapshot size. The README also describes durable host functions whose work can continue across suspension.
What the archive adds
New Runtime’s earlier coverage includes Sandbox SDK, which unified access to several sandbox providers, and BrowserOS’s neo, a browser for coding agents. Psychoscript is a new event: it adds an interpreter-level boundary and resumable state, rather than another provider abstraction or agent browser.
Trend signal
This supports agent security moves to runtime boundaries. Psychoscript places restrictions in the execution environment and host-function interface, rather than relying on instructions in a prompt to keep a program within bounds. The repository describes mechanisms for limiting access, execution time and output, but does not establish how those controls perform under adversarial use.
Why now
The project’s README explicitly targets code produced by models, users or plugins, and the repository history shows a Rust implementation added alongside the TypeScript runtime in November 2026. That timing makes the project relevant to teams exploring controlled execution of generated programs, though the repository does not frame it as a response to a particular incident or deadline.
Why it matters
Generated code can be more flexible than a fixed list of tool calls, but giving it the application’s ordinary privileges also expands the consequences of errors or malicious instructions. Psychoscript’s model makes the application define the callable surface: a program may be able to read through fs.read, for example, without receiving general file-system access. That boundary is useful only if the host functions themselves enforce the right authorization and data limits.
Resumability addresses a separate operational problem. A workflow can wait on an asynchronous tool call, persist its interpreter state and continue after a process restart instead of keeping one process alive indefinitely. The trade-off is added lifecycle complexity: teams need compatible builds, carefully designed snapshots and an explicit policy for calls that might run again. This is an infrastructure component to evaluate and test, not a substitute for reviewing the host API or the code it executes.
Limits and uncertainty
The repository documents the runtime’s design and examples, but those examples do not establish a security guarantee against hostile programs or prove performance in production. The project’s supported JavaScript surface and compatibility boundaries require checking against its interpreter-support documentation and the needs of a particular application. Snapshot compatibility is build-sensitive, and a host call may repeat after resume when configured as idempotent; applications must account for that behavior. The repository page also shows ongoing development, so builders should verify the package version and current implementation details before relying on them operationally.
Skill to build now
Build a small capability map before running generated JavaScript: list each host function, the data it can access, and whether its effects can safely repeat. Then expose only the functions needed for one task, set a timeout and output cap, and test a suspend/resume cycle with a deliberately interrupted async call. This follows the runtime’s documented boundary and retry model without treating the interpreter as a complete application security review.
Reader takeaway
Psychoscript combines a deliberately narrow host API with serializable, resumable JavaScript execution. For builders, the useful idea is the boundary: generated code should receive only explicit capabilities, while retries, snapshot compatibility and limits remain responsibilities of the system that runs it.