OmO
Oh My OpenAgentv3.17.13
HooksHooks

Hooks

Lifecycle automation that keeps OmO sessions recoverable, routed, and moving.

What Hooks Control

Hooks are the harness layer around OpenCode sessions. They can inject instructions, recover malformed state, route slash commands, remind agents about category/skill rules, and resume unfinished work.

FamilyExamplesPurpose
Routingauto-slash-command, keyword-detector, category-skill-reminderTurn user intent into the right workflow.
Continuationralph-loop, todo-continuation-enforcer, task-reminderPrevent unfinished tasks from stopping silently.
Recoverysession-recovery, edit-error-recovery, json-error-recoveryRepair common model/tool failure modes.
Tool integrationinteractive-bash-session, claude-code-hooks, MCP hooksConnect tmux, external tools, and agent-specific tooling.
Contextdirectory-agents-injector, AGENTS-style injectionAdd repository or directory conventions.

Practical Model

You rarely need to memorize every hook. Think of them as four guarantees:

  1. The right instructions are present before work starts.
  2. The right specialist or category is selected for the task.
  3. The session can recover from tool/model glitches.
  4. The agent continues until todos and verification are complete.

Safe Customization

When changing hooks or experimental options:

  • Change one behavior at a time.
  • Run bunx oh-my-opencode doctor --verbose after config changes.
  • Keep continuation hooks enabled unless you are debugging the harness itself.
  • Prefer per-project config for repository-specific behavior.
  • Document any project hook assumptions in .opencode/skills/ or local docs.

Common experimental options are about context and recovery: aggressive_truncation, auto_resume, preemptive_compaction, and truncate_all_tool_outputs. Their exact availability can vary by installed version, so let doctor and the generated schema be the source of truth.

On this page