GitHub - gintasz/neuralyzer: AI agent harness tool allowing it to wipe its own session context and re-run the first message · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
gintasz
neuralyzer
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>11 Commits<br>11 Commits
.changeset
.changeset
.github/workflows
.github/workflows
docs
docs
packages
packages
scripts
scripts
.gitattributes
.gitattributes
.gitignore
.gitignore
CONTRIBUTING.md
CONTRIBUTING.md
LICENSE
LICENSE
README.md
README.md
package-lock.json
package-lock.json
package.json
package.json
tsconfig.base.json
tsconfig.base.json
tsconfig.json
tsconfig.json
vitest.config.ts
vitest.config.ts
View all files
Repository files navigation
🕶️✨ Neuralyzer — make Ralph loops easier
Watch the first minute of this video as an introduction. This extension adds 1 tool for AI agent harness to call, named neuralyzer (no arguments). When the tool is called, all user and assistant messages in the session context are wiped, and a copy of the first message is sent again. Example:
USER: Hi, how are you?<br>ASSISTANT: Good. How can I help?<br>USER: Call neuralyzer tool
🕶️✨ Neuralyzer has flashed.
USER: Hi, how are you? [sent automatically]<br>ASSISTANT: Ready to help!<br>USER: Was neuralyzer tool used in this conversation?<br>ASSISTANT: No, never used.
What's the point?
Easier and more ergonomic loop engineering. A traditional Ralph loop is basically running this command in your shell: while :; do cat PROMPT.md | pi -p ; done, but then you have to save the prompt to a file, handle loop exit conditions, or adapt your workflow to whatever a third-party tool or extension demands. The loop controller lives outside the agent. This tool gives it back to the agent. You can just send the agent a message with control flow like this:
add GitHub comment to that PR saying "Thank you".<br>If no -> wait 5 min and call neuralyzer.">Check if @john has submitted a GitHub PR in this repo fixing authentication bug.<br>If yes -> add GitHub comment to that PR saying "Thank you".<br>If no -> wait 5 min and call neuralyzer.
Better than /loop?
/loop keeps adding to your session's context window, causing context rot and increased session continuation cost due to more tokens being in it, whereas neuralyzer gives the agent a fresh start and makes a loop setup super easy.
Install
Pick your harness:
pi<br>pi install npm:@gintasz/pi-neuralyzer
OpenCode<br>opencode plugin @gintasz/opencode-neuralyzer
Claude Code<br>No. As of June 20, 2026, Claude Code exposes no extension surface (hooks, skills, MCP, agents) that can wipe, fork, rewind, or rewrite session context mid-session. Fork (--fork-session) and /rewind exist, but they are startup-flag / interactive-human only — an agent cannot neuralyze itself.
Don't see your harness? Adding one is the most welcome kind of PR — see CONTRIBUTING.
About
AI agent harness tool allowing it to wipe its own session context and re-run the first message
Topics
agent
ai
opencode
pi
harness
ai-agent
context-window
agentic-coding
context-engineering
opencode-plugin
ralph-wiggum
ralph-loop
pi-extension
pi-package
loop-engineering
Resources
Readme
License
MIT license
Contributing
Contributing
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
stars
Watchers
watching
Forks
forks
Report repository
Releases
@gintasz/opencode-neuralyzer@0.1.1
Latest
Jun 20, 2026
+ 3 releases
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
TypeScript<br>98.9%
Shell<br>1.1%
You can’t perform that action at this time.