mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #980] Field report: local Qwen3.8-Flash-Next (Strata) as an agent building 3D scenes in Unreal Engine 5.8 via MCP — what broke, what fixed it, what is still missing #431
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#431
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @talisp on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/980
TL;DR
What works today:
What made the difference:
<think>tool-call fix (#970).Before → after:
"20× better" is an impression. The measured proxies are 2–3×, plus whole failure classes removed (loops, stranded calls) and vision added.
Still missing:
How it fits together
How the agent "sees" the viewport. Images reach the model only through the auxiliary
vision_analyzetask: a separate, short request with the image and a question. The agent's own turns never carry images.Frame by numbers. One
execute_tool_scriptcall:WorldPosToScreenCoords);trace_world.It returns PASS/FAIL without asking the model anything.
Capture inside Unreal.
CaptureViewport(passcaptureTransform), then write the base64 PNG to disk from Unreal. Only the path goes back through MCP: a lit capture is 3–6 M characters, and the client cuts tool results at 2 M.Decode locally and check the PNG signature.
Ask the model: a neutral question first ("describe only what is clearly visible in the centre"), then specific yes / no / can't see questions.
What went wrong, and how it was fixed
samplingin the Strata config, and Hermes sends none, so the engine was greedyreasoning_budget_tokens: 16000<think>with no</think>--yesinstall has none)./healthshowedimages: false, the firstvision_analyzegot HTTP 400, and nothing in the agent turned that into a stop--vision gpu, then check/health→"images": trueand send one test image; later UD-IQ4_XS with images (#971)auxiliary.vision.temperature: 1.0N|prefixes, a 0-byte state file,stale_write_blocked, corrupted.git/indexAGENTS.md; git and script edits only on the VMtools.tool_search: off. Plus a project skill with one rule per observed errormax_iterations=60agent.max_turns: 250,/goalwith an explicit stop condition, rules on when a turn may end/goalresumed after a restart/goal clear, discard that window's dataRow 12, the open Sequencer blocker:
Night lab E2: after Sit To Stand with KeepState, the centre character ends standing in front of its chair (frame 80). The only time the recipe worked.
E5 after an editor restart: a fresh sequence with the same recipe leaves the character seated at frame 80. The Sequencer stopped driving the mesh (engine/editor side, open).
Details on the costliest items (1, 3, 8)
1. Greedy loops.
3. Blind for ~20 hours.
/health→"images": trueand send one synthetic-image probe before trusting a visual step.8. MCP schema friction. Breakdown of the 71 errors:
execute_tool_script: wrong module,run()not returning a dict, code outside a function;'calls' is not valid JSON, through the meta-tool;Schema traps we hit:
set_properties.valuesmust be a JSON string; with an object it just returnsfalse;CaptureViewportneedscaptureTransform, although the schema says it is optional.What works today
Flows the agent completes on its own:
Seat a character with a Mixamo animation.
AnimationSingleNode+animationData, thenbUseRefPoseOnInitAnim=false.Five characters were done this way.
Stage background characters against a wall: a trace from the chest expects ~35–40 cm. Light them with fill lights measured as a figure/ambient luminance ratio on the same camera, because absolute values drift.
Unattended lab night.
Night 1 ran it all in ~90 min and correctly reported a FAIL with evidence.
Protocols that worked:
Gates before eyes: structural → geometric → capture → vision. Numbers PASS + image FAIL = FAIL. An empty or timed-out vision answer is NOT_EVALUATED, never PASS.
Vision as a second opinion: a neutral question first, one target per image, named by its position.
Operational memory in plain files:
The agent reads the state file always, opens the recipe for the task at hand, and searches the failure log by symptom. Dumping the whole history every session costs context (one session went through 4 compactions). (impression) This is what makes a small local model look much smarter than it is.
Safe saves: only explicit asset paths (
save_assetswith an empty list saves everything dirty). Experiments run in a duplicate level.Morning review: a script packages the night's evidence (summary + thumbnails) for a stronger cloud model to judge. If the cloud judge is unavailable, the night must not stop.
Where the Unreal skill came from. No public Unreal skill existed (the hubs have Blender ones). We did not port a Blender skill, because the tools differ completely. We took the verification ideas from the operator's Blender skills:
We rebuilt those ideas with Unreal tools (projection, occlusion trace, coverage threshold, clean capture, neutral question). The capture skill went from v0.1 to v0.4 in ~80 min. It was tested on two targets and a negative control.
How the human and the agent talk
All user turns from the six Qwen sessions with Unreal work, deduplicated, with the tool calls each one triggered. Categories come from simple text rules, so the boundaries are approximate.
/steer-style)/goaltextHow a command flows today:
/goalwith a stop condition.What already works as one plain sentence (VERIFIED, 10-05, UD-IQ4_XS):
Failure modes in the conversation:
max_turnswas 60.continue("lacks concrete evidence…") after the agent had finished. That gave ~20 continuation turns; the last 17 had 0 tool calls, while the agent kept saying "done, close the goal".(impression) The local model is now good at local, checkable edits described in one sentence. Decomposition (turning an intention into ordered, verifiable steps with limits) still comes from the human and a cloud assistant. The long prompts are where the "intelligence" of the plan lives today.
A design failure: a geometric PASS is not a design PASS, and the agent overrode its own (mostly correct) vision
What was asked (one sentence, 10-05 15:22–15:42, Hermes session DB): make the central witness/guest table fit the hall, "without overdoing it", usable by a seated character and for future props.
What the agent did (19 tool calls, ~20 min):
Asked in one sentence to make a central table "fit the hall, without overdoing it", the local agent built this from 13 merged cubes. It passed every numeric check (size, 80 cm top, knee clearance by traces) and was saved as done.
What its own vision said (3 calls):
Two of the three design remarks were right and are visible in images 01/04: the agent's own reasoning computed side panels from 8 to 40 cm, leaving only ~26 cm of open space under the top (40–66 cm), so "no free knee space" and "closed cabinet" were true. The "too low" remark was probably wrong (bounds put the top at 80 cm). The failure is that the agent dismissed all of it, including the correct parts.
What the agent reasoned: "this bothers me" → "the vision misjudged; I verified with traces and bounds" → saved. The selection gizmo was still in the shot, and the asset name had a doubled prefix (
SM_SM_).The agent's own capture of the table. Vision answered "looks more like a closed cabinet / registry counter, not a console; no free knee space; chair at the short end", and a third call said "the table looks undersized/low". The agent reasoned "this bothers me", then "the vision misjudged; I verified with traces", and saved.
The first capture for the same check did not contain the table at all; vision correctly answered "can't see". "Target not in frame" must count as a failed capture.
The same table in context, seen from the far end facing the throne (editor, Lit mode). The over-built panels and the chair stuck to the short end are obvious to a human at a glance.
Lessons:
Speed: IQ3_S vs UD-IQ4_XS, and what images have to do with it
Hermes sends images only through the short
vision_analyzerequests. That lets us split the traffic cleanly (/metrics, same machine, same sampling, images on in both):How to read it:
How far is "the host opens the door, welcomes the guest, both sit and have tea"?
That sentence is a chain of verbs on two characters, with timing between them and checks over time. Status of each link (VERIFIED from the project's recipe, failure and state files):
Overview of the room the agent staged. Placement and posing work; modelling a piece of furniture does not.
What would have to exist:
Estimate (impression, not measured):
Still far from ideal
trace_worlddoes not hit characters.load_levelcannot discard changes.openis read-only.AGENTS.md: "before any Unreal MCP call, read skill X".Recipe: repeat this setup
Strata server:
--vision gpu). Confirm/health→"images": trueand send a synthetic-image probe (3 coloured shapes: count, shape, colour).samplingblock instrata-*.json, because many agent clients send none and the default is greedy:temperature 1.0, top_p 0.95, top_k 20, min_p 0, presence_penalty 0, repetition_penalty 1.0. Optionally addreasoning_budget_tokens(we use 16000)./metrics→totals.implicit_reasoning_ends."aliases": ["<old model name>"]so the client config stays the same./metricsforcancel/disconnect/lengthand very long replies.Hermes Agent:
context_lengthequal to the server's (262,144). Compression at 50% with the last 20 messages protected worked.auxiliary.vision.temperature: 1.0and a generous timeout, then check that the timeout really applies.tools.tool_search: offif the model breaks JSON through the meta-tool.agent.max_turnshigh (250) and use/goalwith an explicit stop condition. Give a cloud goal judge a local fallback.Unreal MCP:
set_properties.valuesis a JSON string. Read every property back after setting it.save_assetswith explicit paths only, and experiment in a duplicate level.Verification:
Reusable kit
These are sanitized English versions of the files the agent actually used, written from its own errors (dates refer to this project). Adapt the
<placeholders>. They target Hermes Agent + the official Unreal MCP (UE 5.8.3), but the rules are generic.Skill: Unreal MCP rules for a local model (
unreal-mcp-rules/SKILL.md)Skill: Unreal capture as evidence (
unreal-capture-evidence/SKILL.md)State file template (
STATE.md, read at the start of every session)Companion files (opened on demand, not dumped into every session):
R-01 … R-nn): the exact tool, minimal arguments, conditions, versions, observed result, and how it was verified.FAILURE-01 … nn): symptom → cause → fix → evidence. The agent searches it by symptom before retrying something that failed.Lab queue and JSONL attempt log (unattended experiments)
Queue (
LAB_QUEUE.jsonl, one experiment per line, written by the human or a cloud assistant):status:pending|done|done_result_FAIL|not_run_condition|BLOCKED.Attempt log (
LAB_LOG.jsonl, append ONE line per attempt, pass or fail; never rewrite the file):How each attempt is judged (in order; a gate runs only if the previous one passed):
Result:
Limits:
Agent-instruction rules (excerpt for
AGENTS.md: file-tool return shapes and when a turn may end)Appendix A — Server periods (Strata log)
The Strata log lines have no timestamps. The windows come from server restarts matched to config backups and scheduler logs.
Appendix B — Unreal MCP and vision errors per session (Hermes session DB)
Appendix C — Claims and where they come from
agent.log/desktop.logserve/server.pydocstring; 7 saved request dumpsagent.log; Strataservidor.logimages: false(10-03 21:16); HTTP 400 "started without the vision encoder" (10-03 19:58)auxiliary.visiontemperature 1.0 from 10-04 19:41; 15 timeouts at ~120 s, 16:48–22:45; 0 errors in 33 calls afterwardsagent.logand DBagent.logand DB/metricshistory (1,262 / 147 requests) and engine logsNext on this machine: testing even larger quantizations. Questions and corrections are welcome. The aim is that the next person (or LLM) wiring a local model to Unreal starts where we are now, not where we started.
@Niko1221 commented on GitHub (Oct 7, 2026):
Thank you for the field report. We split it into items: a sampling default (Qwen's recommended values in the config, a reasoning budget), vision-off banner for --yes installs, tool call inside think (handled in 0.1.40), the 503 KB tool-result loop (use the opt-in reasoning_loop_recovery), the UD-IQ4_XS speed note (23-25% slower than IQ3_S, for docs), and an agent-harness note. The long loop came from greedy decoding because the client sent no sampling: set temperature and top_p in the request or the config.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.