Skip to content

Agent Harnesses

Squeal is deliberately model- and harness-independent. Every native integration uses the same small surface:

  1. Hook / event delivery to push state transitions at safe turn boundaries.
  2. CLI status (squeal status, squeal checks, squeal why) to pull state on demand.
  3. Explicit checkpoint & run commands (squeal run, squeal proof, squeal retry).

Outside a repository with a squeal.config.json or an existing Squeal store, every harness hook exits in a few milliseconds without starting Node or a daemon.

  • Install: install.sh adds hearsay-tools/marketplace and installs squeal@hearsay at user scope via claude plugin.
  • Hooks: Registers sessions on SessionStart, delivers transitions after tool calls, enforces interrupt.onRegression on file edits, and supports Stop holds/waits for slow and stop-moment check groups.
  • CLI: squeal is available via ~/.local/bin/squeal.
  • Updates: squeal update or claude plugin update.
  • Install: install.sh installs the fixed squeal@hearsay plugin via codex plugin plus the release’s standalone Codex runtime under ~/.codex/plugins/data/squeal-hearsay/ (CODEX_HOME overrides).
  • Hook stability: Because the hook plugin stays fixed and only the runtime updates, Squeal upgrades do not require re-approving hooks.
  • Session isolation: Each Codex session keeps the runtime version it started with. Session start checks for a newer runtime in the background for future sessions.
  • Waiting hooks: On first use in a worktree, trust the hooks (/hooks) so Stop can wait for slow/stop check groups.
  • Install: install.sh unpacks plugins/pi/ from the public GitHub release archive into ~/.local/share/squeal/pi/<version>/ (XDG_DATA_HOME overrides) and runs pi install <dir>.
  • Architecture: Pi loads dist/extension.mjs in-process; Squeal isolates all store work inside an unreferenced worker_threads worker with strict per-hook deadlines so a slow store never blocks or hangs pi -p.
  • Upgrades: squeal update installs the new version and keeps the previous version (plus any version used by a live daemon). Run /reload inside an open Pi session to switch versions.
  • Install: install.sh installs the plugin via opencode plugin file:<dir> -g through a versioned current link.
  • Architecture: Because OpenCode runs on Bun (without node:sqlite) and awaits plugin hooks sequentially, Squeal’s thin plugin spawns per-hook Node 22.19+ bridge entries (dist/hooks/<kind>.mjs) in isolated process groups with tight deadlines (2 s for tool/chat hooks, up to 2 s at idle, 3 s at dispose).
  • Subagents: Tracks root sessions as (session id, "main") and task-tool child sessions as (root id, child id), injecting OPENCODE_SESSION_ID, OPENCODE_AGENT_ID, and bin/ into the agent’s shell environment.
  • Install: install.sh runs agy plugin install <dir> (supports interactive TUI, agy -p, and --input-format stream-json on Linux).
  • Hooks:
    • SessionStart registers the conversation and delivers the primer.
    • PreInvocation delivers transitions after each tool batch.
    • PreToolUse guards file-editing tools (write_file, edit_file, write_to_file, replace_file_content, multi_replace_file_content) and run_command (supporting both interrupt.onRegression and testCommand.denyWhenCurrent).
    • Stop and stop-slow handle end-of-turn news and slow check-group waits.
  • Subagents: Each subagent is tracked as its own Squeal consumer with its own primer and transition cursor.