Skip to content

fix(prompt): back off 30s after a failed registry prompt fetch - #715

Merged
LinuxDevil merged 4 commits into
mainfrom
obs/o10-prompt-fail-closed
Oct 24, 2026
Merged

LinuxDevil merged 4 commits into
mainfrom
obs/o10-prompt-fail-closed

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

With createAgent({ prompt: 'name@latest' }), no instructions, and the observe daemon unreachable, the agent silently ran with no system prompt while the log claimed the embedded instructions were used (seen live). It now fails closed: send()/stream() reject with LOUSHO_PROMPT_UNRESOLVED naming the ref and the fix. With instructions set, behaviour is unchanged. A failed fetch is retried by the first run after a 30 s window (no network wait on runs inside it); successful fetches stay cached.

Ticket: O10 (Forge Observe vs LangSmith evaluation follow-up)

Changes

  • fix(prompt): back off 30s after a failed registry prompt fetch
  • fix(prompt): retry a failed registry prompt fetch on the next run
  • fix(prompt): fail clearly when a registry prompt is unreachable and has no fallback

Verification: focused vitest, tsc --noEmit, eslint on changed files (details in the review package); full suite and fallow run in CI.

🤖 Generated with Claude Code

LinuxDevil and others added 4 commits October 24, 2026 17:58
…as no fallback

createAgent({ prompt: 'name@latest' }) with no instructions and an unreachable
daemon (or 404, or LOUSHO_OBSERVE unset) ran with no system prompt while the log
claimed the embedded instructions were used. It now rejects the first run with
SDKError LOUSHO_PROMPT_UNRESOLVED; with instructions set, behaviour and the
warning text are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed resolution was cached for the agent's lifetime, so with fail-closed a
daemon briefly down at build made every later run reject. A failure is now
dropped so the next run retries; successes stay cached. Adds retry, env-ref
and specific-message tests, splits agentInstructions to keep complexity down,
and notes the retry in docs/observability.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retrying on every run made each run wait up to 2.5s on a down daemon, even for
agents with an instructions fallback. A failed fetch is now remembered for 30s:
runs in the window resolve at once (fallback instructions, or
LOUSHO_PROMPT_UNRESOLVED), then one run retries. Also restores the resolver
option name in the no-fetch fallback path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e typedoc ratchet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LinuxDevil
LinuxDevil merged commit 98d0d7c into main Oct 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant