MCP tool responses (e.g. Serena via mcpm) can deliver output.output as
undefined or a non-string at runtime despite the TypeScript interface
declaring it as string. Add the same typeof guard already used in
tool-output-truncator and other hooks, preventing a TypeError crash.
Fixes#3800
scheduleForcedExit() sets process.exitCode which taints the bun test runner's
own exit code for the entire suite. This caused CI to fail even though all
tests passed individually.
Fix:
- Add __disableScheduledForcedExitForTesting / __enableScheduledForcedExitForTesting
seams to skip scheduleForcedExit() during tests
- beforeEach disables forced exit; afterEach re-enables
- The 'fallback exit timer' test explicitly re-enables to verify setTimeout/clearTimeout
- Remove process.exitCode and exitSpy assertions that required forced exit to be active
(shutdown call counts are sufficient to verify behavior)
The test file modifies process.exitCode and emits process signals which can
leak into bun test's exit code. Add:
1. mock.module() sentinel to route to isolated batch (following abort-with-timeout.test.ts pattern)
2. Global afterAll() hook that resets process.exitCode = 0 before test runner checks it
3. Remove direct checks of process.exitCode in assertions - only check that process.exit() was called with the right code via spy
This ensures bun test exits with code 0 even after tests verify process.exit behavior.
Fixes#3792
Property 'parentSessionID' does not exist on type 'LaunchInput' / 'BackgroundTask'.
The correct casing is 'parentSessionId' (camelCase with lowercase 'd').
Fixes CI build failure on dev branch.
Atlas continuation only treated running background tasks as active work. When a delegated subagent had been launched but was still waiting for session creation, the task remained pending and Atlas could inject another continuation too early.
Treat pending tasks as active background work in the continuation injector and add regression coverage for the pending-session-creation race so delegated work is allowed to acquire a session before Atlas resumes the plan.
Tests: bun test src/hooks/atlas/boulder-continuation-injector.test.ts src/hooks/atlas/index.test.ts; bun run typecheck
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Rename BackgroundTask and attempt ID fields to camelCase across background-agent consumers while moving BackgroundManager construction to a single config object.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Bare "403" and "forbidden" substring patterns (added in 034744cb to
retry the "Selected provider is forbidden" case from PR #3706) matched
any error message containing those tokens — tool-level 403s, file-perm
"forbidden" messages, unrelated upstream errors that happened to spell
"forbidden". The legacy model-fallback path then armed setPendingModelFallback
on those unrelated errors, jumping Sisyphus to claude-opus-4-7 (first
entry of its fallback chain) regardless of the user's configured model.
Replace the bare patterns with the specific phrases PR #3706 actually
targeted, and add regression tests asserting unrelated 403/forbidden
messages stay non-retryable.
Reported-by: ilove_borshch on Discord (#omo-help)
- Add Manual QA Gate as a non-negotiable surface-tool mapping
(interactive_bash for TUI, playwright for browser, curl for HTTP,
driver script for library) to Hephaestus, Sisyphus-Junior, and
Sisyphus' direct-execution mode.
- Restore the dig-deeper trio (tool persistence / dig deeper /
dependency checks) as orthogonal paragraphs so each carries its
own cognitive trigger instead of a fused single statement.
- Harden investigate-before-acting from a soft phrase to a dedicated
block: never speculate about unread code, re-read on every
task hand-off, the worktree may have changed.
- Add 'Parallelize aggressively' as its own block. Reads, searches,
diagnostics, and background sub-agents all batch into a single
response by default.
- Add 'No defensive code, no speculative legacy' to discourage
speculative backward-compatibility branches and unrequested
defensive validation.
- Absorb review-intent and frontend anti-slop coverage so the
prompt stays self-sufficient when the omo agent prompt replaces
the provider prompt.
- Replace literal apply_patch instructions with GPT_APPLY_PATCH_GUIDANCE
(use edit/write tools) so the prompt no longer contradicts the
apply_patch deny that the agent permission applies on GPT models.
- Sisyphus-Junior gains a Review tasks block and a default-behavior
fallback for when the runtime category context is missing or sparse.
- Sisyphus gains an explicit Hard invariants block listing type-
suppression bans, destructive-git bans, and Oracle-completion gating.
- Restore dynamic injections that round out the orchestrator/worker
context: category+skills delegation guide, delegation table,
Oracle dynamic guidance, key triggers, non-Claude planner
reminder. Hephaestus regains optional category delegation while
keeping direct execution as the default.
- Drop em dashes; search guidance points at rg directly throughout.
When shutdown() itself emitted uncaughtException (e.g. EPIPE while closing
a broken pipe), the error listener re-entered itself, re-logged, re-ran
cleanup, and threw EPIPE again. The 6 s forced-exit timer could not fire
because every re-entry stalled the event loop with fresh synchronous work.
Users hit this after v3.17.5 and observed 100+ GB of log lines written to
disk within minutes, with one confirmed report of a 157 GB log file filling
the filesystem.
Detaching the listener with process.off() before running log() + handler()
breaks the loop at the first re-emit: the second event has no listener to
invoke, and the first invocation's scheduleForcedExit() proceeds normally.
The startup toast and `omo --version` were reading from the legacy flat install
at <CACHE_DIR>/node_modules/<pkg>/package.json, but OpenCode actually loads
plugins from a per-plugin sandbox at <CACHE_DIR>/<plugin-entry>/node_modules/
<pkg>/package.json. The two install layers can drift independently when bun
re-resolves "latest" against the flat install while the sandbox's package.json
stays pinned to a literal version baked in at first install.
In practice this means the toast can announce a version the runtime is not
running. Concrete reproduction: with `"oh-my-openagent@latest"` in the plugin
list, the sandbox stayed on 3.17.5 while the parallel flat install advanced to
3.17.6, so the startup toast confidently reported v3.17.6 even though the
loaded plugin code was 3.17.5.
Walking up from `import.meta.url` always reflects the actually-loaded module,
so reorder `getCachedVersion()` to try that first and fall back to the flat-
install candidates and execPath walk-up as before. The fallback chain is
preserved for bundled environments where the module-relative lookup may fail.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Hephaestus 5.5 was rewritten as an outcome-first delegation contract in c3fabaaf. The deep category (spawned as sisyphus-junior under gpt-5.5) now receives a matching prose-driven category context lifted from drafts/gpt-5-5/deep.md instead of the legacy gpt-5.4-era threat-frame version.
Selection happens via a new model-aware resolvePromptAppend hook on BuiltinCategoryDefinition. When the resolved category model is gpt-5.5 the new DEEP_CATEGORY_PROMPT_APPEND_GPT_5_5 is used; older models keep the legacy DEEP_CATEGORY_PROMPT_APPEND. User prompt_append remains preserved on top of either base.
Previously each transform hook was awaited sequentially without per-hook
error handling. If contextInjectorMessagesTransform or thinkingBlockValidator
threw, toolPairValidator was silently skipped, leaving orphaned tool_use
blocks in the post-compaction API payload and producing
"messages.N: tool_use ids were found without tool_result blocks immediately
after" 400s from Anthropic.
Wraps each hook in runHookSafely so an upstream throw is logged but the
chain continues. Adds regression tests covering the isolation contract and
the consecutive-assistants compaction tail case (ses_22bd806).