agentleFS
JJHbramsJJHbrams/Project-AMBER/.github/skills/engram-connect/SKILL.md

engram-connect

Skill2 starsChanged 3 months agoMITView on GitHub

Recover a local Codex-to-Engram MCP connection with bounded loopback-only diagnostics.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this only when Codex's Engram MCP tools are absent or connection recovery is requested.

    line 8
  2. Distinctive:

    If the service is reachable but tools remain unavailable, try the explicit live reconnect below first when an existing managed daemon and …

    line 27
  3. Very specific:

    Use engram-hook-trust separately for explicit /hooks review or a user-requested restore.

    line 32
  4. Distinctive:

    When the running Codex session itself is missing Engram tools, use the bounded reconnect command below.

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Engram Connect

Use this only when Codex's Engram MCP tools are absent or connection recovery is requested. First inspect the configured Codex MCP entry and report what is missing. Never alter provider configuration or hook trust as part of a diagnosis.

For a direct, read-only MCP recovery probe, explicitly identify the Codex root and run node scripts/engram-connect.mjs probe --root <Codex-root>. It reads only that root's config.toml, accepts an unauthenticated http://127.0.0.1 or http://localhost Engram URL, initializes Streamable HTTP MCP, and lists tools. It never changes config, hooks, trust, headers, or provider state.

The only data calls are allowlisted and bounded:

  • node scripts/engram-connect.mjs search --root <Codex-root> --query <keywords>
  • node scripts/engram-connect.mjs read-note --root <Codex-root> --id <note-id>

The helper rejects remote URLs, HTTPS, authorization/header configuration, unknown tools, oversized config/output, and malformed MCP responses. It sends no conversation content, credentials, raw memory, or arbitrary tool payloads.

If the service is reachable but tools remain unavailable, try the explicit live reconnect below first when an existing managed daemon and its target thread are available. Start a new Codex session only when that bounded reconnect is unsupported or there is no such existing daemon/thread. Never add an automatic retry loop, watchdog, or repeated reload polling. Use engram-hook-trust separately for explicit /hooks review or a user-requested restore; this skill never approves hooks.

Explicit live Codex reconnect

When the running Codex session itself is missing Engram tools, use the bounded reconnect command below. It attaches only to the already-running daemon through its control socket; it never starts an app-server, thread, or conversation, and never writes Codex configuration, hook trust, or approvals.

node scripts/engram-connect.mjs reconnect --root <CODEX_HOME> --thread-id <CODEX_THREAD_ID> --codex-executable <path-to-codex.exe>

--thread-id may be omitted only when --root equals the current process's CODEX_HOME and CODEX_THREAD_ID is set. The command first proves the daemon's initialize.codexHome equals the requested root, then verifies the exact requested thread is already loaded. It calls only initialize (with experimentalApi), initialized (a notification), thread/loaded/list, config/mcpServer/reload {}, and mcpServerStatus/list with detail: toolsAndAuthOnly.

The reload request is app-server-wide: it can refresh other already-loaded threads. The helper never directly mutates those threads and only verifies the requested thread. Its JSON output reports requestAccepted separately from engramToolsRestored; a missing tool list is a failing exit status even if reload was accepted. The short-lived proxy process is the only process it cleans up.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.