Harness direct/complete bypass the context compiler; direct mode skips the bounded runtime loop #202
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/a0-symbolics#202
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?
Summary
The Prolog-RLM harness was not using the context compiler on its network paths, and direct mode bypassed the runtime's bounded direct agent loop. Concretely:
prolog_rlmtool'sdirect/completeactions never invoked the context compiler — they sent only the caller's raw arguments, so the live Agent Zero context (system prompt sections, tool declarations, working units) never reached the runtime.PrologRLMModel) only routedsymbolicmodes through the runtime;directmode fell straight through to the inner model, and even symbolic turns flattened history into an opaque text blob instead of compiling units.directdispatch usedrlm:llm_query/3(one unbounded model call, no context, no recursion, no tool loop) instead of the runtime's provider-native direct agent looprlm_direct/4.ok(...)/error(...)outcomes asok:true$term-encoded JSON, so runtime faults looked like successes to host callers.This is the first slice of the operator direction: fully use Prolog-RLM for ALL Agent Zero context and IO — every context projection goes through the Prolog context compiler, and every model IO (direct, symbolic, recursive) goes through the Prolog-owned runtime.
Environment
7c057880(basemaina81d7d55)pytest plugins/_prolog_rlm/tests plugins/_prolog_context_compiler/tests, PlUnitagent_zero_tool_pack_test.pl, live worker IO viaruntime_worker.plRepro (pre-fix)
main, run adirectaction throughplugins/_prolog_rlm/tools/prolog_rlm.py: arguments contain only{prompt, budget}; nocontext_compilerequest is ever emitted.plugins/_prolog_rlm/prolog/runtime_worker.pldispatch fordirect: it calledrlm:llm_query(Prompt, Options, Outcome)— nocontext/1argument accepted, no direct agent loop.completereturned an envelope withok:truewhose result was a$term-encodederror(...)compound.Expected / Actual
Expected:
directandcompletecompile the live Agent Zero context throughcontext_compileand run through the bounded runtime (rlm_direct/4with recursion enabled for direct;rlm_completion/4for symbolic); faults surface as failed envelopes.Actual (pre-fix): compiler unused on all harness paths;
directwas a single unbounded completion with no context;error(...)outcomes were masked asok:true.Evidence (post-fix)
.env:direct(with context, budgetmax_total_tokens:512) →value: "391",usage.model_calls: 1complete(symbolic) →value: "217", trajectory reason "root model answered directly without plan execution"runtime_request_error: runtime_fault(... token_budget_exceeded ...)(fault surface verified).prolog/facts +prolog-verify check→ pass.Follow-ups toward full Prolog-RLM context/IO ownership
agent_zero_tool_registry_import/4) so direct-mode tool calls execute inside the Prolog runtime instead of bypassing it.context_compileso Prolog owns selection in all lanes, including the working-context extension path.