Repository navigation
Conversation
Adds a prompt step type that delegates LLM calls to the calling agent
via halt/resume — the same pattern as approve.
How it works:
1. Lobster runs deterministic shell steps
2. Hits a prompt step → halts
3. Returns status: needs_llm with prompt, system, context, resume token
4. Agent fulfills the prompt with its own model (Opus, Sonnet, etc.)
5. Agent calls: lobster resume --token X --llm-response "..."
6. Lobster continues with remaining steps
No API keys. No HTTP calls. No new dependencies.
New step fields:
- prompt (string) — user prompt, supports $step refs and ${args}
- system (string?) — optional system prompt
A step must have either command OR prompt, never both.
Design decisions:
- Reuses the approve halt/resume pattern — no new primitives
- Host-only — agent's own model handles the prompt
- stdin → context — previous step output becomes LLM context
- Same output contract — $step.stdout and $step.json work identically
- Mutual exclusion — command OR prompt, never both
Tests: 57/57 pass (10 new)
- Human mode now prints LLM request and resume instructions instead of silently exiting - Validate that --llm-response and --approve match the resume state type - Add requiresApproval: null to writeLlmEnvelope for envelope consistency - Add test for --llm-response=value form - Add note to example about search-x skill requirement
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This repo uses pnpm; package-lock.json in PR #6 is likely accidental and can be used for dependency confusion.