OmO chat shows "has not recorded a conversation" once the cwd's session folder holds more than 4096 entries
What happens
An OmO pane that has been chatting for over an hour shows, in Chat:
OmO has not recorded a conversation Ovis can find for this pane yet. Before the first message this is normal; if it stays, use the terminal.
Every OmO pane whose working directory is the same folder shows it, including a pane started a minute earlier. GET /api/pane/conversation?pane_id=<pane> answers 200 {"source":"scrollback","turns":[],"unavailable":"not_found"} for both panes.
Expected
Chat shows the conversation. Everything needed to bind it is there:
herdr pane process-infolists the OmO process (bun …/@code-yeongyu/senpi/dist/bundle/cli.js --extension …/omo-ai/plugin …);isOmoProcessis true.<session dir>/session-holders/<id>/<pid>.jsonexists for that pid;omoProcessIdentityreturns{"heldIds":["<id>"],"custom":false,"held":true}.- The transcript
<session dir>/<timestamp>_<id>.jsonlexists with a validsessionheader whosecwdmatches. - herdr's
pane listreportsagent_session: {"agent":"pi","kind":"path","source":"herdr:pi","value":"<that .jsonl>"}for the pane.
Cause (traced in 0.5.9, unchanged on main today)
server/omo.ts, omoCandidates, line 322:
if (names.length <= 4096) for (const name of names) if (name.endsWith(".jsonl")) paths.add(join(dir, name));
The cwd's session folder here has 4195 entries (1404 .jsonl transcripts, 1420 -artifacts folders, 1371 other files such as *.jsonl.claude-sdk-oauth-binding.json, plus session-holders/). Past 4096 the listing is skipped entirely, so omoCandidates returns no candidate unless an exact path is passed in.
The only exact paths come from /proc/<pid>/fd (none on macOS) and, at line 530, herdr's report — but only when session?.agent === "omo". herdr labels this pane's session agent: "pi", so its correct path is dropped. The held id alone (heldRuntime) only matches files already in the candidate list. Result: selectOmoTranscript gets an empty list and the pane resolves to no_session_path → not_found.
Checked by calling the shipped functions directly against the live panes:
| Call | Result |
|---|---|
omoSessionForPane(pane, cwd, panes) (real store) |
{"path":null,"pending":null} |
omoCandidates(cwd, home) |
0 candidates |
omoCandidates(cwd, home, [herdr's agent_session.value]) |
1 candidate |
omoSessionForPane with a temp home holding only that transcript's header line + its holder record (same pane, same live pid) |
resolves the path |
So the binding logic works; only the folder-size cap stops it.
Possible directions (not tested)
- When a process holds a session id, look up
<dir>/*_<id>.jsonl(or<id>.jsonl) directly instead of needing the whole listing;unwritten()already does a name check of this kind. - Count only
.jsonlnames toward the cap, or page through the folder rather than skipping it. - Accept herdr's
agent_sessionpath whenagentispibut the pane's process is OmO (herdr reports OmO through its pi integration).
Versions
- Ovis 0.5.9 (b87b57b2), managed launcher, macOS 27.2.1 (arm64)
- herdr 0.9.5
- omo-ai 5.1.81, senpi 2026.11.19-5
- Chat opened from the iPhone browser; the API call above reproduces it from the PC.