Skip to content

fix(engine): offer localhost_preview in the request that describes it - #2341

Merged
LHagfoss merged 1 commit into
mainfrom
fix/engine-preview-tool-offered
Oct 23, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
fix/engine-preview-tool-offered

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

In Mac app sessions the system prompt described localhost_preview (network.rs), but the provider request rebuilt its tool policy in turn/request.rs without it. The model was told to use a tool missing from its function list, and in session 01a16a48… it spent ~4 rounds saying "let me open the preview" and running unrelated commands. Both builders now use one helper, network::root_schema_policy.

Changelog

The agent can now actually open the live preview in the Mac app; before, it was told about the tool but never given it.

Testing

cargo check --workspace --tests, cargo test --workspace (new request_policy_offers_preview_with_a_client). One unrelated flaky failure, context::tests::environment_cache_observes_external_instructions_and_tree_changes, passes when re-run alone.

https://claude.ai/code/session_019NPDUr9WpDReZsGXHf8XW7

@github-actions github-actions Bot added the fix A bug fix label Oct 23, 2026
@LHagfoss
LHagfoss merged commit 8bacccb into main Oct 23, 2026
7 checks passed
@LHagfoss
LHagfoss deleted the fix/engine-preview-tool-offered branch October 23, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant