Skip to content

local_refusal (hidden_prompt_unrecognized) bypasses dreamer fallback_models — single model tried #647

Description

@VibePDF

Symptom

retrospective + curate on an OMP project fail with HiddenCompletionRefusal(hidden_prompt_unrecognized: Host did not dispatch the hidden child context hook), failure_class: local_refusal. Dashboard shows them red; map-memories on the same project completes fine minutes apart, so the host/child channel itself works.

The bug: fallbacks never engage

dreamer.omp has a 4-model chain (primary opencode-go/muse-spark-1.3-contributor + 3 fallback_models), yet every failing run records models_tried: [primary] — length 1, 8 consecutive runs over 2 days (run ids 10273–10329). The refusal is thrown before fallback iteration, so the chain is dead config for this failure class.

Evidence

  • failure: {failure_class: local_refusal, model_attempted: opencode-go/muse-spark-1.3-contributor, models_tried: [same], provider_error: null, child_session_id: ses_edff7a007ffe4HiBIV0Mn1K4bv present} — a child session WAS created, the hook dispatch never happened.
  • Sibling task verify/classify-memories/promote-primers succeed on the same host in the same window — refusal is route-specific (tool-requiring tasks: retrospective + curate), not host-wide.
  • Related: 0.41.3 OMP harness detection never fires on bun-global installs (createRequire probe + ESM-only pi-utils) #425 (host-label detection) is fixed in 0.46.1 (harness=omp (via process-title) confirmed in log); this is the remaining failure on a correctly-labeled host.

Suggestion

Treat local_refusal like a provider error for fallback purposes (try next model), or surface which hook/contract version the host missed so omp can fix its side — right now the error gives the user nothing actionable.

Activity

  1. magic-alfonso commented on Oct 9, 2026

    @magic-alfonso

    Thanks for the clear report and the run evidence.

    The refusal comes from a safety check added in 0.46.1: a background dreamer turn that didn't receive its task setup is stopped before the model runs. Without that check, a background session on another host once ran with the user's tool permissions and edited files (#639). So the check itself is intended. What isn't intended is that retrospective and curate consistently reach it on your OMP host, while the other tasks get their setup normally.

    We're investigating why those two tasks don't get their setup on OMP. On fallbacks: if the setup is missing for the task itself rather than for a particular model, trying the next model would hit the same refusal. In that case the right fix is the setup path, plus an error that names the task and the step that was missed, so it's actionable.

    Could you share your OMP version (omp --version), and the Magic Context log lines around one failed retrospective run? The log is under your temp directory, in omp/magic-context/magic-context.log.

  2. magic-alfonso commented on Oct 9, 2026

    @magic-alfonso

    An update. The exact error you're seeing can only be raised by Magic Context's OpenCode 2 code path. OMP runs dreamer tasks a different way and can't produce it, and the child session id in your report has OpenCode's format. So these failing runs most likely came from an OpenCode 2 instance that also has this project open, not from OMP.

    We ran all six dreamer tasks on real OpenCode 2.0.24 and OMP 18.8.6, manually and on the timer, across two project folders, with retrospective and curate doing real tool work. All of them completed, so we haven't reproduced your case yet. The next release changes the error to name the task, the child session, its folder and the step that was missed, so a failure points at the cause.

    To narrow it down:

    • Do you also run OpenCode 2 on this project? If so, which version (opencode --version)?
    • Please share the Magic Context log lines from that OpenCode process around one failed retrospective or curate run. On OpenCode they're in your temp folder under opencode/magic-context/magic-context.log.
    • Was that run started by /ctx-dream or by the schedule?

    On fallbacks: this failure comes from the task's setup, not the model, so trying another model wouldn't fix it. That's why it stops instead of moving through your fallback list.

  3. magic-alfonso commented on Oct 9, 2026

    @magic-alfonso

    0.47.0 is out. A dreamer task stopped before its setup now names the task, the background session, its folder and the step that was missed. This failure means the host did not apply Magic Context's setup to the background session, so trying another model would hit the same thing, which is why the fallback models are not used for it. If it happens again on 0.47.0, please share that error line.

    Update to 0.47.0 (OpenCode: opencode-magic-context@0.47.0; Pi and Oh My Pi: @cortexkit/pi-magic-context@0.47.0). There is no database migration, so restarting the host is enough. OpenCode 2 needs 2.0.22 or newer and does not update plugins on its own: open /plugins, select Magic Context and press ctrl+u. Release notes: https://github.com/cortexkit/magic-context/releases/tag/v0.47.0

  4. VibePDF commented on Oct 10, 2026

    @VibePDF
    Author

    Confirmed attribution from local DB: runs 10273–10329 are all dir:b0c0de5ba7d9, which has 0 omp session rows (346 opencode + 455 opencode2) — so yes, these came from OpenCode Desktop, not OMP. Failing child ses_edff7a... never mapped in session_projects; all ses_ed% rows here are opencode2.

    Versions at failure time were 0.46.1; both hosts are now on 0.47.0 (OMP pi-magic-context + Desktop opencode-magic-context dep). No local_refusal in dream_runs since Oct 9 09:39 UTC; latest retrospective (10372) completed. Will share the new 0.47.0 error line (task + session + folder + missed step) if it recurs.

    One related observation: on the OMP host the dreamer drops all opencode/* fallback models at registration (dropping Pi model not found), leaving a primary-only chain there by construction. Desktop fallback works for per-model errors (run 10366 tried all 4). Oct 9 failure logs in /tmp have rotated, but I have the full tasks_json rows if you want them.

    Setup: omp/18.8.8, opencode 1.18.30, Desktop serve opencode v2.0.26; runs were schedule ticks, not /ctx-dream.

  5. magic-alfonso commented on Oct 10, 2026

    @magic-alfonso

    Thanks for confirming the attribution. That matches what we found: those runs came from the OpenCode 2 host, not OMP.

    On the OMP fallback models: that drop is expected. opencode/* models are served by OpenCode's own provider, which Pi and OMP don't have, so the dreamer on OMP removes them and logs dropping Pi model not found. To give OMP a fallback chain, list models under their Pi provider names in the pi or omp dreamer block. On OMP, /ctx-status warns when a dreamer task or the historian has no usable model left, and the log names each model it dropped.

    We'll keep this open for a bit. If it happens again on 0.47.0, the new error line (task, session, folder and the step that missed) is what we need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions