
Security News
OpenCode User Hit with Hostile Backlash After Reporting Free AI Loophole
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.
@ghostpaw/codex
Advanced tools
Standalone belief and memory engine for Node.js — SQLite, zero dependencies, with a built-in LLM tool facade
Agent memory as beliefs with a source, a certainty and a revision history.
npm install @ghostpaw/codex
Local, evidence-backed memory for AI agents. One SQLite file, zero runtime dependencies.
Codex stores what an agent believes as claims with a source, a certainty, evidence counts, decay and an honest revision history. Agents search before they remember, confirm or correct instead of appending, and see which beliefs are stale, fading or weakly evidenced. It runs as a TypeScript library, an MCP server, a CLI and an Agent Skill, all generated from the same seven tools.
Website: codex.ghostpaw.dev
Requires Node.js 24+ (uses the built-in node:sqlite).
The npm package requires Node 24+:
npm install -g @ghostpaw/codex
npx -y @ghostpaw/codex --help
Standalone binaries are available from GitHub Releases for linux-x64, linux-arm64, darwin-arm64, darwin-x64 and windows-x64.
curl -fsSL https://raw.githubusercontent.com/GhostPawJS/codex/main/install.sh | sh
irm https://raw.githubusercontent.com/GhostPawJS/codex/main/install.ps1 | iex
Other release installers:
mise use -g github:GhostPawJS/codex
ubi --project GhostPawJS/codex --exe ghostpaw-codex --in ~/.local/bin
eget GhostPawJS/codex
For aqua, define a
github_release package in aqua.yaml:
registries:
- name: codex
type: local
path: codex-registry.yaml
packages:
- name: GhostPawJS/codex@v0.4.0
registry: codex
codex-registry.yaml:
packages:
- type: github_release
repo_owner: GhostPawJS
repo_name: codex
asset: ghostpaw-codex-{{trimV .Version}}-{{.OS}}-{{.Arch}}.tar.gz
format: tar.gz
replacements: { amd64: x64 }
overrides:
- goos: windows
asset: ghostpaw-codex-{{trimV .Version}}-windows-{{.Arch}}.zip
format: zip
files:
- name: ghostpaw-codex
Install scripts verify SHA256SUMS. To verify a downloaded archive's build attestation:
gh attestation verify <archive> -R GhostPawJS/codex
Set GHOSTPAW_VERIFY=attestation for attestation verification in install.sh.
Binaries are unsigned; macOS binaries carry an ad-hoc signature. For a browser
download on macOS, remove quarantine with
xattr -d com.apple.quarantine /path/to/ghostpaw-codex.
Linux binaries require glibc 2.28+; use npx on Alpine.
See the binary build workflow.
Every client below starts the same stdio server: npx -y @ghostpaw/codex mcp.
Beliefs live in ~/.ghostpaw/codex.db unless the GHOSTPAW_CODEX_DB
environment variable (absolute path) or --db <path> says otherwise.
Claude Code
claude mcp add ghostpaw-codex -- npx -y @ghostpaw/codex mcp
or as a plugin, which also installs the skill:
/plugin marketplace add GhostPawJS/codex
/plugin install ghostpaw-codex@ghostpaw-codex
Codex CLI (~/.codex/config.toml)
[mcp_servers.ghostpaw-codex]
command = "npx"
args = ["-y", "@ghostpaw/codex", "mcp"]
Cursor (.cursor/mcp.json), Claude Desktop (claude_desktop_config.json)
or a project .mcp.json:
{
"mcpServers": {
"ghostpaw-codex": {
"command": "npx",
"args": ["-y", "@ghostpaw/codex", "mcp"]
}
}
}
Claude Desktop users can also install server.mcpb from the
latest GitHub release.
A Dockerfile is included for container hosts:
docker build -t ghostpaw-codex . && docker run -i --rm -v codex:/data ghostpaw-codex.
The server speaks MCP 2026-07-28 (stateless, server/discover) and the
initialize-based revisions 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05.
ghostpaw-codex search <query> [--limit N --min-score N --category C --source S]
ghostpaw-codex review <flags|status|log|trends> [--limit N --now N]
ghostpaw-codex belief add <claim> --source S --category C [--certainty N --provenance P]
ghostpaw-codex belief show <beliefId>
ghostpaw-codex belief retire <beliefId>
ghostpaw-codex belief confirm|correct|forget|defer <beliefId> [flags]
ghostpaw-codex belief merge <beliefIds...> [flags]
ghostpaw-codex proximity dismiss <beliefA> <beliefB>
ghostpaw-codex mcp|skill|tools|describe|call|completions|version|help
Global flags can appear anywhere: --db <path>, --json, --quiet,
--compact, --help/-h, --version/-V/-v, --no-color.
NO_COLOR is accepted; output uses no terminal colors.
Noun-verb commands print the full tool result as JSON with --json or when
stdout is piped. Terminal output shows the summary and payload.
--quiet suppresses stdout. --compact removes JSON indentation.
Use help belief, belief --help or belief correct --help for schema-derived
help. Correction takes --claim; defer takes --deferred-until (timestamp).
Array flags repeat, kebab-case flags map to schema properties, and @path
reads a value from a file. -- ends flags. A positional -, or piped stdin
with no arguments, reads a JSON object; explicit flags override its fields.
Database selection uses --db, GHOSTPAW_CODEX_DB, then ~/.ghostpaw/codex.db.
| Exit | Noun-verb result |
|---|---|
| 0 | Success, including no_op |
| 1 | Tool error |
| 2 | Usage or schema error |
| 3 | Clarification needed or not found |
| 4 | Conflict or version mismatch |
| 70 | Internal error |
Errors go to stderr. With --json, usage and internal errors also print
{ok:false,error:{code,message}} to stdout. Tool results retain their full
shape. Legacy tools [--json], describe <tool>, call <tool> [JSON|-]
and <tool_name> --parameter value keep their existing exit codes.
completions bash, completions zsh and completions fish print shell scripts.
ghostpaw-codex belief add "Deploys go out on Tuesdays" --source explicit --category procedure
ghostpaw-codex search "when do we deploy" --json | jq '.data.results'
printf '%s' '{"beliefId":1}' | ghostpaw-codex belief show - --json
SKILL.md (repo root) and skills/codex/SKILL.md follow the
Agent Skills format and ship in the npm package.
Copy skills/codex/ into your agent's skills folder, or print it:
npx -y @ghostpaw/codex skill > SKILL.md
npm install @ghostpaw/codex
import { DatabaseSync } from 'node:sqlite';
import { initCodexTables, read, write } from '@ghostpaw/codex';
const db = new DatabaseSync('codex.db');
initCodexTables(db);
const { id } = write.remember(db, {
claim: 'The API uses GraphQL with a REST fallback.',
source: 'explicit',
category: 'fact',
});
write.confirmBelief(db, id);
write.correctBelief(db, id, {
claim: 'The API uses GraphQL exclusively; REST was retired.',
source: 'observed',
category: 'fact',
});
read.recall(db, 'graphql api'); // ranked, lineage-aware
read.listFlags(db); // stale, fading, low-trust, single-evidence
Wire the same tools into any LLM SDK. Each tool carries a JSON Schema:
import { tools } from '@ghostpaw/codex';
for (const tool of tools.codexTools) {
// tool.name, tool.description, tool.inputSchema, tool.handler(db, input)
}
Or embed the MCP server in your own process:
import { createCodexMcpServer } from '@ghostpaw/codex/mcp';
const server = createCodexMcpServer({ dbPath: './codex.db' });
A markdown memory file works until it doesn't:
It stays local: one file you can copy, back up or inspect with any SQLite tool. No server, no API key, no network.
| Tool | What it does |
|---|---|
search_codex | Hybrid lexical and semantic recall across active beliefs |
review_codex | Dashboards: flags, status, trends, log |
inspect_codex_item | One belief in full: metrics, lineage, nearby beliefs |
remember_belief | Capture a claim with source, category and provenance |
revise_belief | Confirm, correct, forget, defer or merge |
retire_belief | Hard-delete for privacy or cleanup |
dismiss_proximity | Mark two nearby beliefs as intentionally distinct |
Results are structured (outcome: success | no_op | needs_clarification | error) with entities, next-step hints and recovery advice. The MCP server,
CLI, SKILL.md and plugin manifests are generated from this registry
(npm run surfaces) and drift-checked in CI.
Measured with npm run bench on Node 24.14.0, Linux, Intel Xeon (shared
cloud vCPU), 10,000 beliefs in a file-backed database:
| Operation | p50 | p95 |
|---|---|---|
search_codex (tool) | 3.6 ms | 5.0 ms |
MCP tools/call search, stdio framing included | 3.8 ms | 4.2 ms |
read.recall | 3.7 ms | 4.8 ms |
inspect_codex_item | 3.5 ms | 3.8 ms |
write.remember (includes proximity scan) | 4.5 ms | 5.6 ms |
review_codex | 11.7 ms | 13.2 ms |
Cold start (process spawn to first response, median): --version 26 ms,
MCP server/discover 24 ms, first search against the 10,000-belief file
53 ms. Seeding 10,000 beliefs takes 2.2 s on disk.
Gzip sizes and cold-start medians are budgeted in budgets.json and enforced
by npm run check.
| Concept | Purpose |
|---|---|
| Belief | A claim held with certainty, evidence, provenance, decay and revision lineage |
| Dismissal | A record that two semantically close beliefs are intentionally distinct |
| Flag | A derived attention signal: stale, fading, low-trust, single-evidence or gap |
| Proximity | Semantic nearness between beliefs, detected on write |
| Lineage | The revision chain from corrections and supersessions, with version diffs |
State is derived, never toggled: freshness, strength, review priority and flags are computed at read time.
| Import | Contents |
|---|---|
@ghostpaw/codex | initCodexTables, read, write, tools, skills, soul, all types |
@ghostpaw/codex/mcp | createCodexMcpServer, serveCodexMcp, generic MCP server helpers |
ghostpaw-codex (bin) | Noun-verb CLI, legacy tool forms, mcp, skill, shell completions |
dist/mcp-server.js | Standalone stdio MCP server entry (used by the MCP Bundle and the Dockerfile) |
SKILL.md, skills/codex/ | Agent Skill with 17 workflow references |
ESM and CommonJS, with type declarations for both.
| Document | Audience |
|---|---|
| HUMAN.md | Developers using the read / write API |
| LLM.md | Agent builders wiring soul, tools and skills |
| docs/README.md | Architecture: model, invariants, scoring, source layout |
| docs/entities/ | Per-entity manuals with exact public API listings |
| CHANGELOG.md | Release history |
npm install
npm run check # types, lint, zero-deps, tests, build, surfaces, size, API, consumer, startup, ratchet
npm run bench # hot-path benchmarks at 10,000 beliefs
npm run surfaces # regenerate SKILL.md, plugin manifests, server.json, mcpb manifest
npm run check is the single gate, locally and in CI. Size budgets
(budgets.json) and the public API snapshot (api-surface.json) can only
grow with an explicit approval tag in the commit message. The repo is pinned
to Node 24.14.0 via .nvmrc.
If this package helps your project, consider sponsoring its maintenance:
FAQs
Standalone belief and memory engine for Node.js — SQLite, zero dependencies, with a built-in LLM tool facade
The npm package @ghostpaw/codex receives a total of 1,341 weekly downloads. As such, @ghostpaw/codex popularity was classified as popular.
We found that @ghostpaw/codex demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.

Threat Research
/Security News
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.

Threat Research
Malicious Firefox extensions mimic Phantom, Jupiter, and Bitget wallets to steal recovery phrases and private keys, with one fetching its payload remotely.