Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Agent bootstrap cluster (the paste-in desktop-agent install) (more)
Subsystem index · Previous entries.
src/core/transcripts/capture-spec.ts+codex-hook-lane.ts— the per-harness session-end capture seam.capture-spec.ts: the satisfies-anchoredCAPTURE_SPECSrecord ({confine, parse, discover?}) for the STDIN-DRIVEN lanes (claude-code, codex);captureSpecFor()resolves unknown/undefined/opencode to the claude spec (golden-pinned bytest/codex-hook-lane.test.ts); openclaw is deliberately NOT a member (its lane is in-process, trusted-plane — see context-engine.ts).codex-hook-lane.ts:confineCodexTranscriptPath(the same S3#8 ladder as the claude root, pinned at BOTHcodexSessionsDir()ANDcodexArchivedSessionsDir()— codex MOVES a rollout into the flatarchived_sessionsstore on archive, so fencing only the live store refused a still-valid path; both CODEX_HOME-resolved since the spawner IS codex; an explicitly pinned test-seamrootstays single-root; ENOENT/ENOTDIR on the path ismissing_path— the rung hook.ts gates its discovery fallback on — whileunreadableis reserved for EACCES/IO faults, so the codex session-end heartbeat reason for a nonexistenttranscript_pathafter a failed discovery istranscript_missing_path, nottranscript_unreadable; no WSL branch v1),parseCodexHookTranscript(ParsedTranscript shape over the adapter's exportedmapCodexLine; same OPT-INcollectToolCallscontract asparseTranscript, and the samecapToolCallInputbound on observed args; head+tail over budget so session_meta identity survives;recognizedOnlywhen every non-blank line parsed and was a session header, so hook.ts ends a Codex session opened and closed with no prompt asok/empty_session(no status alert, no corpus file) while any unknown or torn record with zero turns staysparser_drift; tool calls from the OBSERVED args keys —custom_tool_call.inputfixture-verified,function_call.argumentssource-verified at rust-v0.147.0; tolerant JSON-string parse; NOresultjoin — 0.147.0 persists no success flag on*_outputrows;compactedrows become boundary positions), anddiscoverNewestCodexRollout(bounded newest-first walk over the dated live store, then a flat pass over the archived store under the SAME 4096 dirent cap — skipped once the cap trips; id-in-filename match, and an id-matched archived hit keepstranscript_discovered(never relabelled_newest, which hook.ts reads as a guess and bars from the relay); symlink-reject — the fallback fortranscript_path: nullor a moved rollout, and the seam for SIGKILL'd sessions, which never fire SessionEnd). Engine-free by construction; never imports discover.ts. Pinned bytest/codex-hook-lane.test.ts+test/codex-hook-lane-archived.test.ts+ the runHook-driven matrix intest/memorable-relay.serial.test.ts.