๐Ÿ” Continuity

TL;DR ๐Ÿš€ Every Amy Discord thread is an on-disk omp session. Grab the thread ID โ†’ point omp at that threadโ€™s --session-dir โ†’ add -c. Youโ€™re back in the exact same conversation, now in your terminal. Daemon and CLI share one session file transparently.


โšก Do it in one command

A Discord thread URL ends in the thread ID:

https://discord.com/channels/<guild>/<THREAD_ID>
                                      โ””โ”€โ”€ this โ”€โ”€โ”˜

Resume that thread interactively in your terminal:

THREAD=1514275906170912769   # ๐Ÿ‘ˆ paste your thread ID
omp --allow-home --cwd /home/usr \
    --session-dir ~/.omp/amy-sessions/$THREAD -c

One-shot / headless (exactly what the daemon does):

omp --allow-home --cwd /home/usr \
    --session-dir ~/.omp/amy-sessions/$THREAD -c "your next prompt"
  • -c โ–ถ๏ธ continues the latest session in that dir.
  • -r 019eb1f2 ๐ŸŽฏ resumes a specific session by ID prefix (when a dir holds more than one).
  • Omit -c/-r to start a fresh session that still lives in that threadโ€™s dir.

๐Ÿง  The #1 confusion: cwd โ‰  session store

Two unrelated directories. Conflating them is the classic trip-up.

flowchart LR
  A["๐Ÿ–ฅ๏ธ omp run"] --> B["๐Ÿ“‚ cwd โ€” where files get edited"]
  A --> C["๐Ÿ’พ session store โ€” where the transcript saves"]
  B --> B1["/home/usr ยท AMY_WORKDIR (default HOME)"]
  C --> C1["default: ~/.omp/agent/sessions/ + cwd-bucket"]
  C --> C2["Amy override: ~/.omp/amy-sessions/ + threadId"]
๐Ÿ“‚ cwd (--cwd)๐Ÿ’พ session store (--session-dir)
WhatWhere the agent reads/edits filesWhere the transcript (*.jsonl) is saved
๐Ÿ  Amyโ€™s value/home/usr (AMY_WORKDIR, default $HOME)~/.omp/amy-sessions/<threadId>/
๐Ÿค– Your normal CLIwherever you launched~/.omp/agent/sessions/<cwd-bucket>/ (auto)

๐Ÿ’ก โ€œI thought all sessions were in /home/usr!โ€ โ€” Half-true. /home/usr is the cwd, and omp buckets the default store by cwd. Your home cwd shows up as the - bucket: ~/.omp/agent/sessions/-/. So your interactive sessions are keyed by /home/usr, not stored loose in it.


๐Ÿ—บ๏ธ Where every session actually lives

WhoStore pathKeyed byContinue with
๐Ÿง‘โ€๐Ÿ’ป You (plain omp from home)~/.omp/agent/sessions/-/cwd (/home/usr โ†’ -)omp -c (same cwd)
๐Ÿงต Amy thread~/.omp/amy-sessions/<threadId>/Discord thread IDomp --session-dir โ€ฆ -c

The daemon deliberately splits each Discord thread out of the cwd bucket via --session-dir (amyd.mjs, or wrapper ompcordd.mjs), so every thread is its own independently-resumable session โ€” no collisions with your interactive work. Default remains ~/.omp/amy-sessions; OMPCORD_SESSION_ROOT/existing ~/.omp/ompcord-sessions are supported without stranding legacy threads.


๐Ÿ›ก๏ธ Safety โ€” never double-write a live session

CLI and daemon share one .jsonl. Both writing at once corrupts continuity.

pgrep -f 'node (amyd|ompcordd)\.mjs'        # ๐Ÿ” is the daemon running?
  • โœ… Daemon idle โ†’ continue from CLI freely; it picks up your turns next time.
  • โ›” Daemon mid-turn in that thread โ†’ wait until its run finishes (the dirโ€™s .jsonl stops growing). Or /amy cancel in Discord first.

๐Ÿ” Direction matters

DirectionWorks?Why
Discord thread โ†’ CLIโœ…point --session-dir at ~/.omp/amy-sessions/<threadId>
CLI (--session-dir โ€ฆ) โ†’ Discordโœ…daemon reads the same dir; its -c sees your turns
Plain CLI session โ†’ DiscordโŒitโ€™s in the - cwd bucket, not a thread dir โ€” Amy never looks there

๐Ÿงฉ Why each flag

FlagReason
--session-dir ~/.omp/amy-sessions/<threadId>๐ŸŽฏ the threadโ€™s transcript store โ€” the whole point
-cโ–ถ๏ธ continue the latest session there
--allow-home --cwd /home/usr๐Ÿ  replicate Amyโ€™s env; without --allow-home, omp auto-relocates out of ~
--model <m>๐Ÿง  match AMY_MODEL if the daemon set one (else omit)

The daemon also injects --append-system-prompt ASK_PROTOCOL so its headless agent can ask via Discord components. From the interactive CLI you donโ€™t need it โ€” the native ask picker works directly.


โœ… Verify you grabbed the right session

THREAD=1514275906170912769
ls -t ~/.omp/amy-sessions/$THREAD/*.jsonl | head -1   # ๐Ÿ‘€ the file -c will reopen

The newest *.jsonl there is exactly what -c resumes โ€” match it against the last messages in the Discord thread.


See also: Ompcord โ€” Always-on Discord Bridge (the bridge) ยท Amy SSOT Embed Dashboard (/amy status shows the live cwd/session).