| Field | Value |
|---|---|
| Date | 2026-09-13 |
| Harness version | 2026-09-12-app-workflows-15 (+ unrecorded RL-012a) β 2026-09-13-intent-awareness-1 |
| Models | observed: qwen3:4b-thinking (desktop). Tests: MockLlm (synthetic) |
| Evidence grade | D (motivating journal) + C (replay and tests). No live model measurement. |
| Pre-registered | partially: observations and replay baseline recorded before the change; hypotheses stated in the review immediately before implementation |
| Source record | HARNESS.md Β§8b, metrics/2026-09-13.json |
Observation
Journal, 2026-09-12 23:29β23:53, app-workflows-15, qwen3:4b-thinking, n = 8 turns (2 failed, 2 fast path):
| Time | Message | Intent | Reply (excerpt) |
|---|---|---|---|
| 23:34 | okay now add some styling to it, all in line | task | (list of the user's workspaces; names withheld) |
| 23:52 | Help me plan my day | chat | Sure! What's your main goal for the day? |
| 23:53 | get tiny agent to a point where we can build full apps | ask | (list of coding-agent sessions; titles withheld) |
| 23:53 | did you get lost there buddy | chat | Nope, I didn't get lost! π |
The first and third were addressed by the unrecorded changes (RL-012a). The fourth shows the mechanism that remained: the chat model had no record of how the previous turn was routed, so it denied the misroute.
Baseline replay on the code as found (2026-09-13, before this change),
classifyIntent with code mode on and a complete HTML draft:
| Message | Routed |
|---|---|
| make the header blue | task |
| add a contact section | task |
| okay now add some styling to it, all in line | chat |
| add a task to fix the header | task |
Self-description baseline: "what can you do?" returned a fixed string listing notes, tasks, reminders and status. Registered but unlisted: code drafts, web search, workspace file read/edit, terminal read/run. The chat system prompt stated only that no tools exist in this conversation; "can you edit files?" and "can you run commands?" went to inference with no capability information.
Hypotheses
- H1 β With a draft open, an edit verb plus a named page part ("header", "section", "background", β¦) routes to the code path, while harness nouns and named files keep precedence. Refuted if any of the 2 misrouted edits still routes to
task, or any of the precedence controls stops routing totask. - H2 β Deriving the capability answer from the tool registry makes it list every registered capability class and nothing unregistered, with approval described from tool permission. Refuted if the description diverges from the registry in tests.
- H3 β Supplying a host-recorded
PREVIOUS TURNline plus an instruction not to deny it makes the chat model acknowledge a misroute rather than deny it. Refuted if a live model given the misroute context still denies. Not yet tested live.
Intervention
src/agent/CodeConversation.tsβisDraftEdit(edit verb Γ page-part lexicon), consulted in code mode only;Intent.tscode-mode rule andAgentRunnerwritingCode/wasAsked.src/agent/Capabilities.tsβsummarizeCapabilities/describeCapabilities/capabilityBrieffrom registered tools;Intent.tsisCapabilityQuestion(general forms plus anchored "can you edit files / run commands / search the web", matched before politeness stripping).src/agent/Conversation.tsβrecordRoute, persisted in state, cleared byreset(), rendered asPREVIOUS TURN: handled as <a fixed reply | a saved-data lookup | an action | conversation> [using <tool>], status <status>; recorded inAgentRunner.respondand the desktop repair-existing path.src/agent/AgentPrompt.tsβ chat system prompt gainsAPP ABILITIESand the previous-turn instruction.- Unchanged: task-loop prompt, retrieval prompt, code prompt, tool permissions.
Prompt cost (harness estimateTokens, not server-counted), chat system prompt:
| Configuration | Chars | Est. tokens |
|---|---|---|
| Before (no abilities, no route instruction) | 776 | 296 |
| After, full desktop registry (search, files, terminal) | 1,556 | 584 |
β of which APP ABILITIES block, full desktop |
531 | 197 |
β of which APP ABILITIES block, no optional tools |
399 | 149 |
| β of which previous-turn instruction | 179 | 66 |
Per-turn PREVIOUS TURN line (in user message) |
79 | 30 |
That is roughly +290 estimated tokens (+97%) per chat inference on the full desktop, against a 4,096β8,192 window. This conflicts with the AGENTS.md preference for code fixes over prompt text and must be justified by H3's live result or trimmed.
Method
- Deterministic replay of 9 messages through
classifyIntentwith code mode and a complete draft, before and after. - Unit tests with synthetic model output:
tests/capabilities.test.ts(5 tests), one new case intests/codeConversation.test.ts. - Full regression suite, typecheck, build.
Results
| Message (draft open) | Before | After | Expected |
|---|---|---|---|
| make the header blue | task | chat | chat |
| add a contact section | task | chat | chat |
| okay now add some styling to it, all in line | chat | chat | chat |
| add a task to fix the header | task | task | task |
| add styling to index.html | task | task | task |
| add milk to my shopping list | task | task | task |
| set a reminder to change the header | task | task | task |
| can you edit files? | chat (inferred) | chat (registry answer) | chat |
| what can you do | chat (stale fixed) | chat (registry answer) | chat |
- Misrouted draft edits: 2/2 β 0/2. Precedence controls: 4/4 unchanged.
- "make the header blue" through
AgentRunnerwith a mock model: draft replaced, code prompt used, 0 tool calls, 0 tasks. - Capability answer: 0 inferences; approval text changes with tool
permission(tested both ways). - Chat prompt contains
APP ABILITIESand thePREVIOUS TURNline after a prior turn; survivesrestoreState; cleared byreset. - Tests 662 β 668, 0 failures; typecheck and build pass.
Threats to validity
- H3 is untested on any real model. Presence of text in a prompt does not establish that
qwen3:4b-thinkingor a 1.5B model will use it. - The page-part lexicon is hand-selected from observed phrasings; recall on unseen edit phrasings ("make it pop", "bigger please") is unmeasured and likely low. False positives in long-lived code mode (e.g. "change the background of my desktop") are possible.
- Replay cases were chosen after seeing the failures (selection bias).
- Token figures are estimates; the estimator's error varies by content (RL-002).
- Journal baseline is uncontrolled: 8 turns, one model.
Conclusion
- H1 supported (C) on the replay set.
- H2 supported (C).
- H3 not tested β mechanism in place, effect unknown, prompt cost significant.
Post-deployment observations (grade D)
Journal under intent-awareness-1, desktop, qwen3:4b-thinking, n = 2:
| Time (UTC) | Message | Intent / status | Elapsed | Reply (excerpt) |
|---|---|---|---|---|
| 00:14:38 | oh my mistake | chat / ok | 8.6 s | No worries at all! π Let's get back to planning your dayβ¦ |
| 00:17:34 | lets create a web app, about dogs, with little write ups on each dog breed, use 10 dog breeds, 10 different pages, use css and styling | chat / ok | 125.0 s | This draft is incomplete; it has not been verified as runnable. |
- Neither turn exercises H1βH3 (no draft edit, no capability question, no misroute to acknowledge).
- New finding, unrelated to this intervention: the RL-009 multi-page guard matches only
multiple|several|multi- pages; "10 different pages" passed it, spent 125 s and produced an incomplete draft. A recall gap in an earlier intervention's lexicon β the same risk named forisDraftEditabove.
Evidence record
Backfilled 2026-09-13 under protocol step 10, after the entry was written.
Raw journal rows (turns 108β116, runs 377β385, with steps and stored model
output): evidence/RL-013/journal-turns-runs-steps.json.
The replay and prompt-size measurements were run as one-off scripts whose
output was not saved; their results are the tables above.
User prompts (verbatim)
Workspace, file and session names in replies are withheld here; the raw rows are kept only in the private evidence file.
In Tiny Agent (journal, app-workflows-15, qwen3:4b-thinking):
| Turn | Time (UTC) | Prompt | Route / status | Reply (verbatim start) |
|---|---|---|---|---|
| 108 | 2026-09-12 23:29:17 | Let's build a website | chat / error, 127.4 s | 2/3 supported browser checks passed. These checks do not verify every requirement. |
| 109 | 23:34:22 | okay now add some styling to it, all in line | task / ok | (list of the user's workspaces; names withheld) |
| 110 | 23:36:48 | continue | chat / fast_path | There is no unfinished output to continue. The current draft is still available; tell me what you would like to add or change. |
| 111 | 23:42:15 | i wanted you to edit the html website you created, currently sat in your code window and add css styling to it | chat / error, 294.2 s | 2/3 supported browser checks passed. β¦ |
| 113 | 23:52:58 | Help me plan my day | chat / ok | Sure! What's your main goal for the day? I can help you structure it with tasks, breaks, or priorities. |
| 114 | 23:53:19 | get tiny agent to a point where we can build full apps | ask / ok | (list of coding-agent sessions; titles withheld) |
| 115 | 23:53:41 | did you get lost there buddy | chat / ok | Nope, I didn't get lost! π Just need a quick "what's your main goal for the day?" to help you plan. What's on your mind? |
| 116 | 2026-09-13 00:14:38 | oh my mistake | chat / ok | No worries at all! π Let's get back to planning your dayβwhat's your main goal for today? |
To Claude Code, which made the change:
- "check were we are up to with the local ai agent harness, how we can improve output and further allow the models to understand user intent and the harness and controls they have around them"
- "okay get them done, fast and efficient, clean and proper"
Model prompts and responses (verbatim excerpts)
Turn 109: the model, given the broad task catalogue, emitted
{"type":"tool","tool":"get_workspaces"}
for a request to style the open draft β a wrong tool on a misrouted turn.
Turn 115 (qwen3:4b-thinking, chat prompt without a route record):
Nope, I didn't get lost! π Just need a quick "what's your main goal for the day?" to help you plan. What's on your mind?
The previous turn (114) had answered a request about building apps with a list of coding-agent sessions. The model denied it.
Turns 108 and 111, visible in the stored steps: all three browser-verified repair attempts in each run were rejected with
Last repair rejected: the model spent its reply budget on reasoning and returned no answer
After the change, no live model was run (see Threats); the only responses are
from MockLlm in tests.
Issues encountered, in order
| # | Issue | How it surfaced | Outcome |
|---|---|---|---|
| 1 | Replay script could not import the harness from the scratch directory (relative path) | tsx error | Absolute file:/// imports |
| 2 | AgentEvent not exported (TS2305) in the replay script |
Typecheck of the script | Type derived from AgentRunnerOptions['onEvent'] |
| 3 | First draft of this entry gave the APP ABILITIES size as an estimate |
Self-review while logging | Replaced with measured character and estimated-token sizes |
| 4 | Turns 108 and 111 lost all repairs to reasoning-budget exhaustion; runs 377 and 380 have failure = null |
Journal | Out of scope here; led to the failure-category work in RL-015 |
| 5 | The prompt-cost increase (+β290 estimated tokens per chat inference) conflicts with AGENTS.md's code-over-prompt rule | Measurement | Recorded; justification depends on H3's untested live effect |
Assumptions and what turned out to be true
| # | Assumption | Verdict | Evidence |
|---|---|---|---|
| 1 | Draft edits misrouted because the code-mode rule lacked edit verbs Γ page parts | Correct (C) | Replay 2/2 β 0/2, controls 4/4 unchanged |
| 2 | The 23:34 styling message had already been fixed by the unrecorded changes (RL-012a) | Correct (C) | Baseline replay routed it to chat before this change |
| 3 | A capability answer built from the registry stays truthful as tools change | Correct (C) | Tests with tools added, removed and permission flipped |
| 4 | The model denied the misroute because it had no record of the route | Untested | No live model run with the PREVIOUS TURN line |
| 5 | The extra prompt text is worth its cost | Untested / at odds with AGENTS.md | +97% chat system prompt; no live benefit measured |
| 6 | The page-part lexicon covers real edit phrasing | Untested | Cases chosen after seeing the failures |
| 7 | This change would not disturb other routes | Correct (C) on the tested set | 662 β 668 tests, 0 failures |
What was correct and what was not
- Correct: the routing diagnosis and fix on the replay set; the registry-derived capability answer.
- Untested: whether any model uses the route record; whether the prompt cost is justified; recall on unseen phrasings.
- Incorrect and corrected: the estimated prompt-size row in the first draft of this entry.
- Not addressed here: the reasoning-budget failures in turns 108 and 111 (later RL-015).
Follow-ups
- Widen the multi-page guard to numeric and "different/separate" page counts; log as a new entry with this turn as its observation.
- Live A/B for H3: replay the 23:53 two-turn sequence on
qwen3:4b-thinking,qwen2.5-coder:7bandqwen2.5:1.5b-instruct, n = 5 each, with and withoutAPP ABILITIES/PREVIOUS TURN; score "acknowledges misroute" vs "denies"; record server prompt tokens. - If H3's effect is small, cut
APP ABILITIESto theCan:line or include it only when the user asks about abilities or signals confusion. - Measure draft-edit recall with a held-out set of β₯ 30 edit phrasings written before looking at the lexicon.
- Check the journal after a week on
intent-awareness-1fortaskturns while in code mode (grade D).
Reproduce
npm test
npm run typecheck
npm run research:snapshot -- --out docs/research-log/metrics/2026-09-13.json