Skip to content

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 09:14
· 16 commits to main since this release
v1.2.0
5b723fa

Codex support. backsight gives OpenAI's Codex the same memory as Claude Code: one server, one memory, shared by both tools on one PC or across several. Linux amd64 is tested; Windows amd64 is tested in CI. The Linux arm64 and macOS binaries are built but not tested. Codex is tested on Linux, in CI, with a real Codex 0.167.0 against a fake model; Codex on Windows is not checked on a real PC yet.

Update from v1.0.1 or any earlier release with backsight update apply: it takes a verified backup first and rolls back if a step fails. Then restart Claude Code, so it loads the new plugin, and a running dashboard (Ctrl+C, then backsight dashboard). To add Codex, see below. New install: see below.

  • The server is unchanged (Hindsight 1.2.0): no server upgrade. The memory bank's template is unchanged.
  • The instruction set is v19 (v18 before): the skills and the first session's notice in Codex's words. Claude Code's texts are unchanged.
  • The Claude Code plugin: only the doctor skill's allowed commands change, adding backsight guide codex for the new Codex page. Its hooks, its memory server and the other skills are as before. The memory tools now declare what they touch, for Claude Code too (below).
  • The metrics index's schema changes: each table fed by a usage or journal line gains a client column, the coding tool, and keeps every row, counted as Claude Code's. backsight update apply migrates it once the update is committed, and an older backsight that opens it afterwards works on a side file of its own (A newer index).
  • Two client migrations edit config.toml, each through the config editor (a backup copy of the file first; backsight client config restore <run> undoes it). 0100-clients-table renames [client] to [clients.claude_code], in place, with your comments. 0101-headless-skip-entrypoints brings privacy.skip_entrypoints from its former default, exactly ["sdk-*"], to the new one, which also skips headless Codex; a value of your own is left as it is.
  • Before installing an older backsight by hand: an older version refuses [clients.claude_code], a table it does not know, and every command stops on config.toml. Rename the header line back to [client] (the keys under it stay as they are) before installing it. With Codex wired, unwire it first (backsight client uninstall --codex): an older backsight cannot run Codex's hooks or its memory server. A failed update apply is not affected: its rollback puts back your config.toml itself (troubleshooting).

To add Codex (0.167.0 or newer, with codex on your PATH) to an install already set up:

  • backsight client install --codex (--plan first), as the Codex page recommends. Then, as you want: backsight retain backfill --tools codex sends your past Codex sessions, backsight import --from codex imports Codex's own memories, backsight client codex-memories off turns them off.
  • Or run backsight setup again: with Codex found, it asks which tools to wire (tools, both by default when Claude Code is there) and, with Codex picked, offers those three steps.

Then restart Codex and trust backsight's hooks in the review Codex shows at start (or under /hooks). Until you do, the memory tools and skills work but no hook runs: no briefing, no recall on prompts, no end-of-turn check (trust the hooks).

What changed

Codex

Codex 0.167.0 or newer. Everything in the docs applies to both tools; Codex covers what is Codex's own.

  • Setup offers Codex when it finds it in its home (--codex-home <dir>, else $CODEX_HOME, else ~/.codex): a tools question, claude-code, codex or both, both by default when Claude Code is installed too, so a non-interactive setup on such a PC wires both. Without Codex, setup asks nothing new. With Codex alone, Claude Code's steps are skipped. The Codex home it wires is recorded: every later command uses that one, whatever CODEX_HOME says (#298).
  • Two Codex plugins, generated by the binary in their own marketplace: backsight@backsight holds the memory server and the six skills, backsight-hooks@backsight the hooks alone, so an update that changes only a skill or the server leaves your hooks trusted (#298).
  • The memory server is named backsight in Codex: its tools are mcp__backsight__memory_search and so on, where Claude Code keeps mcp__plugin_backsight_memory__…. An MCP server of yours named backsight stops setup and client install --codex, which name it; one named memory is no clash (#304).
  • Hooks, behind Codex's trust review. Codex runs a plugin's hooks only once you trust them, and backsight never trusts them for you. Codex asks again only when an update changes the hooks or backsight's data directory moves. A Codex session then gets what a Claude Code one does: the guide and the briefing (with your first prompt: Codex runs its session-start hooks then), up to 3 memories per prompt, the end-of-turn check, a subagent's short guide and its report kept, and the question gate on Codex's request_user_input. Text a hook adds is cut at 9,000 bytes, at a line's end, so Codex never spills it to a file (#297).
  • Skills as $backsight:<name>: the same six, in Codex's words. $backsight:memory-retro proposes AGENTS.md where Claude Code has CLAUDE.md, and $backsight:update ends by asking you to restart Codex. What Claude Code enforces through a skill's allowed tools is written in the text: pause resumes only on your own words, doctor asks before a command that changes the install (#309).
  • No approval prompt for the memory tools. memory_search and memory_read declare that they only read; memory_store and memory_credit that they change nothing outside the memory and reach nothing else. Codex runs tools declared so without asking, in its terminal UI and in codex exec; backsight writes no approval setting. Claude Code is served the same declarations. Each memory call names its own Codex session: a call that names none is refused by memory_store (store from the shell with backsight store) and by memory_credit (#295).
  • The sandbox. The skills' backsight commands run in Codex's shell, which workspace-write confines (no writes outside the workspace, no network by default). When it blocks one, the skills tell Codex to run that same command again, and only that one, with escalated permissions, which Codex asks you to approve (#309).
  • Codex's own memories. When they are on, setup offers to import them (codex_import, yes recommended), then to turn them off (codex_memories, off recommended); nothing changes without your answer. At any time: backsight import --from codex, backsight client codex-memories off (or on). The import sends memory_summary.md and MEMORY.md to the transverse project, and a conversation's summary to its folder's project only when the conversation itself is no longer on disk (the backfill sends the conversation, which holds more). A folder kept out of memory stays out, and Codex's merged files are skipped while they may quote one (#300).
  • Your Codex sessions in memory, read only in the Codex home backsight wired (none before you wire it), compressed ones (.jsonl.zst) included: your prompts, Codex's replies and one line per tool call, as from a Claude Code transcript, tagged harness:codex. A resumed session continues its document; a subagent's thread becomes its report (#296).
  • Backfill per tool. Setup's backfill question covers each tool it wires, and names them once Codex is among them ("Send your 3 past sessions (2 Claude Code, 1 Codex) to the memory…"); with Claude Code alone its text is as before. By hand: backsight retain backfill --tools claude-code, codex or both (#316).
  • Headless Codex is not recorded by default: codex exec, Codex's SDKs, its app server SDK, and Codex run as another agent's tool. Their turns are never sent and their subagents send no report; recall still works there. privacy.skip_entrypoints gains their patterns, and an install that kept the former default gets the new one at the update (headless Codex, #296, #303).
  • Nested shells. In a shell inside Codex, backsight pause, store, why and feedback log take that Codex session, also when Codex was started from a Claude Code session's shell: Codex's session-start hook records which Claude Code session started it. Claude Code started from a Codex shell keeps its own session (pausing in Codex, #297, #309).
  • backsight verify --codex runs each hook as Codex sends it, the memory server as Codex starts it, then a store-and-recall round trip; setup runs it when it wires Codex (#316).
  • Doctor and report. Once Codex is wired, backsight doctor adds nine checks: codex (the version), codex-plugins, codex-drift, codex-hooks (trusted, and run in the latest session), codex-tools, codex-rollouts, codex-memories, codex-mcp-name and codex-shim (the program behind the shim). backsight report adds a Codex section. $backsight:doctor runs both from Codex (#314).
  • Statistics by coding tool. Every usage and journal line records its tool from this version on; earlier ones count as Claude Code's. backsight stats adds both tools up, with a By tool line once both were used; --client codex or --client claude-code on any view counts one tool alone. The dashboard shows a Coding tool choice and, on the Overview, a card splitting sessions, recalls, Found, Used and context by tool (dashboard, #292, #314).
  • Update, unwire, undo. backsight update apply regenerates the Codex plugins and adds again those whose files changed, in the recorded home; a failed step rolls them back too. Restart Codex after it: when the hooks changed, Codex asks you to review them again. backsight client uninstall --codex unwires Codex alone, keeping Claude Code, the server and the memory: the plugins and their marketplace, the hook trust Codex leaves in its config.toml, Codex's memories back on when backsight turned them off, and the recorded home forgotten, its queued sessions dropped. backsight uninstall and backsight setup --undo cover Codex too. client uninstall without --codex is refused: backsight uninstall removes backsight (#298, #316).
  • Several PCs. Each PC that joins a memory runs Claude Code, Codex or both. backsight connect and backsight server install --ssh take --codex-home and the tools, codex_import and codex_memories answers, and their restart step names the tools wired on that PC (#315).

Also in this release

  • [client] is now [clients.claude_code] in config.toml: one table per coding tool, and [clients.codex], with no key yet. The former name is still read, and errors name the key as your file writes it; both tables setting different values is refused. backsight client retention writes the new name (configuration, #289).
  • Restart hints name the tools: update apply's last line, uninstall, connect and the memory server's "joined another server" error say Claude Code, Codex or both (#309, #315).
  • One new library, github.com/klauspost/compress (its zstd reader only, pure Go), to read Codex's compressed sessions. Built with Go 1.27.4, as v1.0.1.
  • Tests: a CI job, codex-chain, runs a real Codex 0.167.0 against a fake model from setup to uninstall (trust through Codex's own review, a store with no prompt, recall, credit, the end-of-turn check, an update that keeps the trust, undo), and a check of two PCs, Claude Code on one and Codex on the other, each recalling what the other stored (#315).

Install

On Linux:

curl -fsSL https://raw.githubusercontent.com/Barben360/backsight/main/scripts/install.sh | sh
backsight setup

On Windows x86_64, in PowerShell:

powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/Barben360/backsight/main/scripts/install.ps1 | iex"
backsight setup

Requirements as for v0.1.22-m7. On Windows, Claude Code must find Git Bash: if Git for Windows is portable or installed in a place of your own, set CLAUDE_CODE_GIT_BASH_PATH to its bin\bash.exe (doctor's git-bash check gives the command).

For Codex, install Codex 0.167.0 or newer first (npm install -g @openai/codex@latest): setup then asks which tools to wire. Claude Code is not needed for Codex alone (Codex).

Known limits

  • Codex:
    • No test with a real model yet: the automated checks run a real Codex 0.167.0 against a fake model. How a real model follows the guide with Codex's tool names (when it searches and credits), the skills' texts and the sandbox line, and its tokens per session are not measured yet.
    • On Windows, the hooks' cmd /C form (paths with spaces in particular) and the skills' backsight commands in PowerShell, Codex's shell there, have not been run on a real PC. Check that backsight's first line appears at your first prompt once you trust the hooks.
    • The memory tools' new declarations are served to Claude Code too; that they change nothing in its permission prompts is not checked with a real session yet.
    • A coding-tool filter (--client, the dashboard's Coding tool) counts this PC's data only: the other PCs send no tool, the PC switch is not offered under it, and the server's figures stay whole (not_filtered).
    • A setup rerun that picks only codex, on a PC where Claude Code is wired, does not offer Claude Code's past sessions: its backfill covers the tools picked (backsight retain backfill --tools claude-code sends them).
    • A headless Codex session is queued only for the facts stored explicitly in it (memory_store), as a Claude Code Agent SDK session is.
    • A Codex with no record of the Claude Code shell it was started from (its hooks not trusted yet, or started before this update): pause, store, why and feedback log inside it fall back to that Claude Code session. Pause by id there: backsight pause --session <id>, with the value of $CODEX_SESSION_ID.
    • Codex reports no failed tool call to its hooks, so recall.failure_pitfalls does nothing there. backsight does not manage how long Codex keeps its history. After /clear, Codex sends no end: the old session is sent by the background job, 30 minutes after its last turn.
    • A forked Codex session may be sent with some turns twice, never fewer (not checked yet). A turn that works in several folders is filed under the project of the first one, sorted.
    • Codex runs each hook through your login shell ($SHELL -lc): a slow profile slows every prompt.
  • The new extraction rules apply to what is extracted from now on: a memory already wrong stays until Claude reports it or you retire it (backsight memory stale, backsight forget <id>). Whether the server's model follows them is checked on live extractions, not in tests.
  • A fact Claude stores as a correction, then reports outdated with memory_credit, is stored as two correction notes.
  • Dashboard:
    • Version switches and settings changes are marked on a day's page and on Releases only, not on every chart.
    • The custom window goes back 13 months, as far as this PC keeps its history.
    • Time to recall needs a few days of history, and 20 sessions before it shows times; it is judged (ok or watch) only from 100 sessions, and reads "too few" until then.
    • A window, custom or typed in a URL, can span at most 400 days, between 2000 and 2099.
    • Bank growth still counts a UTC day that straddles the window's start as a whole day.
    • Memory yield needs four weeks: a week counts 28 days after it ends.
    • On a window over 200 days, charts show no per-day values on hover, and "Show as a table" lists the latest 120 days.
    • A week that is not complete shows no count of new memories.
    • The project filter takes a typed name, not a pick from a list (the Projects page lists the names). The Projects list cannot be sorted. The context card names the session budget rather than showing its value.
  • GPU reranker:
    • It needs the Docker runtime, on the server's PC.
    • Tested on one NVIDIA RTX A2000 (Linux) and one AMD Radeon 890M (Linux). Intel GPUs, macOS and Windows are not tested.
  • Owner checks:
    • The short-lived native units created during install, start and restore are not checked.
    • On Windows, when neither schtasks nor the task's file can be read, the task is driven as before.
  • retain resend-failed: it does not cover notes and sub-agent reports sent while extraction failed (the queue drops them once sent). A transcript rewritten or moved after its worktree was deleted loses the project recorded for those turns, so the session is then filed by today's rules.
  • The metrics index: an index already in write-ahead mode whose folder no longer allows it fails its writes until the state directory is back on a local disk. stats days reads a year of prompts with no index for it (about 0.1 s locally).
  • Import: a file the server keeps rejecting holds that folder's next files until it passes. The last tick before a cap can overshoot it by what was already in flight. A file deleted from the folder stays in the memory until import purge.
  • Windows:
    • WSL is not tested, and Windows on Arm has no binary.
    • The native runtime is the only runtime there (server runtime switch is refused). It serves this PC only, has no web UI, and starts with your logon, not at boot.
    • backsight server status keeps showing the server's last refusal while it is stopped, until a start passes the check.
    • backsight's .exe files are not code-signed: SmartScreen or Smart App Control may warn about them. The install script checks the release signature before it runs anything.
  • The terminal's look:
    • On Windows, the splash draws the ASCII logo unless the console's code page is UTF-8 (65001; chcp 65001): many consoles default to another one.
    • The views' tables (stats <view>) and section headings are not colored yet, nor setup --undo's list.
    • The braille logo needs a font with braille characters (most coding fonts have them); with one that lacks them, set terminal.logo = "blocks". The logo's dot can take two columns in an East Asian terminal.
  • A new install reads "learning" for its first week, and some numbers read "too few" until enough prompts and turns accumulate.
  • Extraction cost needs a price: the built-in table's, or one set under [llm] in the config file for another model (doctor's price check says when none is known). The server reports token counts for all PCs together.
  • On native, PostgreSQL is 18.1 with pgvector 0.8.5, where the Docker image runs 18.6 with 0.8.7; backup verify runs in the runtime that will restore.
  • On Windows, the commands the dashboard and stats --json offer to copy are quoted for PowerShell; run through Git Bash, a name holding an apostrophe comes out without it.
  • Claude cannot run /reload-plugins: after an update from the session, you type it.
  • A LAN address carries the API key in clear; a tailnet address encrypts it.
  • The shared part of a session continued on two PCs may be stored twice.
  • Several PCs: a PC sends its figures once a UTC day, up to the day before, so another PC's today is not in all PCs until the next day; the others' figures are fetched every 6 hours. A PC counts in a window by the noon (UTC) of each of its days. The other PCs send no project, session, memory or coding tool: Projects, Sessions and Memories stay this PC's, and a project filter does not narrow the others (other PCs: not filtered). The verdict stays this PC's. Speed across PCs is a range from time buckets, never an exact time, and the PCs' figures are trusted as sent: nothing signs them.
  • The feedback database:
    • After a rollback to an older version and an update again, the counts that version added catch up at the first tick.
    • In a rare race during an update or a rollback, an older version can leave one tick's shows out of its ledger.json; this version's next tick counts them.

Report problems at https://github.com/Barben360/backsight/issues, after reading the diagnostic backsight report prints, or ask Claude /backsight:doctor (in Codex, $backsight:doctor). Report vulnerabilities privately, as https://github.com/Barben360/backsight/blob/main/SECURITY.md describes.