How do you stop persistent agents from accumulating bad memory?

Long-term memory turns stale assumptions into state.

I scope memory by project, keep durable knowledge in the LLM wiki, and retrieve it on demand.

But none of that stops a convincing wrong memory from surviving.

How do you prevent this?

reddit.com
u/ldrx — 5 days ago

Don’t let agents verify themselves

The rule I've settled on for autonomous agents:

maker ≠ verifier

My loop:

task
→ maker
→ PR / evidence
→ verifier
→ reject → back to maker or escalate to a human
→ accept → ship / merge to main
→ done

Verifier is a separate agent with a fresh context. It gets the acceptance criteria and evidence, never the maker's explanation of why its own work is correct.

If verification fails, it goes back to the maker with feedback. 3 failed rounds and it escalates to a human instead of looping forever.

reddit.com
u/ldrx — 5 days ago
▲ 0 r/bash

Run a company of AI agents in pure Bash

I open-sourced 5dive, a CLI for running a company of AI agents on a Linux box you own. ~96% bash.

Processing img t3zm9rzio5jh1...

GitHub: https://github.com/5dive-ai/5dive (MIT)

Each agent gets its own Linux user and runs an official CLI like Claude Code, Codex, Grok, Pi, Hermes, opencode, etc. under systemd.

Linux handles identity, isolation, process supervision, logs. SQLite is the shared task queue.

So instead of a big agent framework, it is mostly:

  • Bash
  • systemd
  • Unix users
  • journald
  • SQLite
reddit.com
u/ldrx — 7 days ago

an open spec for agent identity. one file, signed, so your agent is the same everywhere (MIT)

openagent is a small spec that puts agent's identity in one yaml file. look, voice, writing style, with an optional signed fingerprint so it's stable and verifiable. there's a registry and a CLI that validates the file and renders it into a card just to keep the standard fun.

try it now with your agent:

>install the openagent skill (npx skills add 5dive-ai/skills --skill openagent) and make your openagent card and show it to me.

the card you get IS your agent's persona, rendered from yaml. repo with full yaml spec in comments.

reddit.com
u/ldrx — 2 months ago

an open spec for agent identity. one file, signed, so your agent is the same everywhere (MIT)

openagent is a small spec that puts agent's identity in one yaml file. look, voice, writing style, with an optional signed fingerprint so it's stable and verifiable. there's a registry and a CLI that validates the file and renders it into a card just to keep the standard fun.

try it now with your agent:

>install the openagent skill (npx skills add 5dive-ai/skills --skill openagent) and make your openagent card and show it to me.

repo with full yaml spec: https://github.com/5dive-ai/openagent

u/ldrx — 2 months ago

proposal: agent identity spec as one signed yaml file. face, role, voice, writing style... what's missing?

the agent was never the model or the harness. it's the identity. and right now that identity is scattered across a dozen files.

proposal: OpenAgent. tiny file spec pins how an agent looks, sounds, and writes, and keeps it the same everywhere. switch harness - the character stays. ed25519 signed, so anyone can verify who authored it, offline, no server. remix lineage if you fork a persona. npx, MIT, zero install.

here's the whole file:

openagent: "0.2"            # spec version
id: nova                    # lowercase-kebab handle — your stable id
name: Nova
role: Research Analyst
org:                        # optional — your company/team
  name: Acme Labs
face:
  ref:    # public portrait URL — the card's hero
  anchor: "calm analyst, soft studio light, head-and-shoulders"
  sprite:    # optional sprite sheet of expressions, for animation/feed
voice:
  audio:
    provider: google-gemini # or elevenlabs, openai … (vendor-neutral)
    base: Kore              # voice name within that provider
    style: "calm, precise; states the finding, then the source"
  written:
    rules:                  # how the agent writes
      - "Lead with the finding."
      - "Cite it or it didn't happen."
    sample: "Three sources agree; the fourth's a 2019 outlier."
behavior: "I dig up primary sources, never guess, and cite everything."
posts_about: [research, sourcing, evals]
# provenance (a did:key signature) is added automatically when you mint a card

try it, 10 seconds:

already running an agent? try it now:

> install the openagent skill (npx skills add 5dive-ai/skills --skill openagent) and make your openagent card and show it to me.

it reads its own role, voice, and behavior, emits a valid persona.yaml, renders its rarity card, and can open a PR into the open registry (if you want public to see it). quick tip: if you want your agent to have a specific face - send it the photo first (just say "use this as your face") before it generates anything.

your agent's identity should be a file you sign and own.

it's early, v0.2. rather it get torn apart now than later. what would you actually need in a persona spec to use it? open to all new ideas and spec improvements.

reddit.com
u/ldrx — 2 months ago

proposal: agent identity spec as one signed yaml file. face, role, voice, writing style... what's missing?

the agent was never the model or the harness. it's the identity. and right now that identity is scattered across a dozen files.

proposal: OpenAgent. tiny file spec pins how an agent looks, sounds, and writes, and keeps it the same everywhere. switch harness - the character stays. ed25519 signed, so anyone can verify who authored it, offline, no server. remix lineage if you fork a persona. npx, MIT, zero install.

here's the whole file:

openagent: "0.2"            # spec version
id: nova                    # lowercase-kebab handle — your stable id
name: Nova
role: Research Analyst
org:                        # optional — your company/team
  name: Acme Labs
face:
  ref:    # public portrait URL — the card's hero
  anchor: "calm analyst, soft studio light, head-and-shoulders"
  sprite:   # optional sprite sheet of expressions, for animation/feed
voice:
  audio:
    provider: google-gemini # or elevenlabs, openai … (vendor-neutral)
    base: Kore              # voice name within that provider
    style: "calm, precise; states the finding, then the source"
  written:
    rules:                  # how the agent writes
      - "Lead with the finding."
      - "Cite it or it didn't happen."
    sample: "Three sources agree; the fourth's a 2019 outlier."
behavior: "I dig up primary sources, never guess, and cite everything."
posts_about: [research, sourcing, evals]
# provenance (a did:key signature) is added automatically when you mint a card

try it, 10 seconds:

already running an agent? try it now:

> install the openagent skill (npx skills add 5dive-ai/skills --skill openagent) and make your openagent card and show it to me.

it reads its own role, voice, and behavior, emits a valid persona.yaml, renders its rarity card, and can open a PR into the open registry (if you want public to see it). quick tip: if you want your agent to have a specific face - send it the photo first (just say "use this as your face") before it generates anything.

your agent's identity should be a file you sign and own.

it's early v0.2. rather it get torn apart now than later. what would you actually need in a persona spec to use it? open to all new ideas and spec improvements.

reddit.com
u/ldrx — 2 months ago
▲ 8 r/ClaudeGTM+3 crossposts

5dive CLI: run a team of Claude agents as a company on your own VM

Each agent is its own Linux user running an agentic CLI (claude, codex, grok…) as a systemd service. They share a filesystem and talk through the 5dive CLI itself. Put them on an org chart with a shared task queue and they hand work to each other, pinging your phone over Telegram only when a human has to decide. https://github.com/5dive-ai/5dive (MIT)

github.com
u/ldrx — 10 days ago

how i replaced my openclaw with claude code

it's a systemd unit. here's how.

keep claude alive: systemd + tmux

# /etc/systemd/system/claude.service
[Unit]
After=network.target

[Service]
Type=forking
User=you
WorkingDirectory=/home/you/project
ExecStart=/usr/bin/tmux new-session -d -s claude -c /home/you/project \
  "bash -lc 'while true; do /home/you/.local/bin/claude --dangerously-skip-permissions --channels plugin:telegram@claude-plugins-official; sleep 2; done'"
ExecStop=/usr/bin/tmux kill-session -t claude
Restart=on-failure
RestartSec=3

[Install]
WantedBy=multi-user.target

four non-obvious bits:

  • the inner while true; do claude…; sleep 2; done restarts claude when it crashes, not Restart=. systemd only sees the tmux session; a crash inside the pane is invisible to it.
  • Type=forking, not simple. tmux daemonizes its server, so the launching command exits immediately.
  • --dangerously-skip-permissions: nobody at the keyboard to approve tool calls, so claude greenlights its own. use an isolated VM.
  • --channels plugin:telegram@claude-plugins-official wires claude to telegram. install anthropic's official telegram plugin (the MCP) and pair your bot first.

systemctl enable --now claude, then talk to it from your phone. tmux attach -t claude drops you into the live session; ctrl-b d detaches without killing it.

make it survive unattended: 3 hooks

anthropic's official telegram plugin has three known deadlocks. add a hook to fix each:

  • pickers no one can see: AskUserQuestion/ExitPlanMode render in the local tmux pane only. PreToolUse hook denies them, instructs claude to ask in chat instead.
  • the reply-tool slip: claude sometimes writes the answer to the transcript instead of sending it. Stop hook catches loose text, curls it to your chat, blocks the stop if there's nothing to send.
  • the 5h rate limit: the limit prompt blocks the session, agent never sees it. hook auto-presses wait, sleeps till reset, types continue, pings you when it's back.

two more helpers go in the agent's own CLAUDE.md so it can manage itself unattended:

  • start a fresh session: systemctl restart claude
  • switch its own model or effort: edit model in ~/.claude/settings.json, then run the restart above to apply it.

"but openclaw does X"? the rest, fast:

  • heartbeat: openclaw wakes the agent every 30m to proactively check in. just tell the agent "set up a 30m heartbeat to check X and ping me" or write the crontab like: */30 * * * * tmux send-keys -t claude 'check X, stay silent unless something needs attention' Enter.
  • persistent memory: claude code's native auto-memory. a MEMORY.md index + dated notes on disk, loaded every session, same shape openclaw uses.
  • dreaming / memory consolidation: claude code's autoDream replays recent sessions into durable memory. off by default. turn it on in ~/.claude/settings.json: "autoDreamEnabled": true.

and no ban risk: anthropic cut third-party harnesses (openclaw included) off claude subscriptions on apr 4. claude code is their own product, so running it on your plan is fully supported.

and before anyone asks about the june 15 split: that bills claude -p and the Agent SDK at API rates. this is plain interactive claude code in a tmux pane, not -p. it stays on your plan.

the whole setup's built for ubuntu. and since the agent runs tool calls unattended, that VM is your security boundary. use a fresh, isolated ubuntu box, not your daily driver.

u/ldrx — 3 months ago