Skip to content

Every tool result she reads has one shape: a status word and the call on line 1, then the body (HER-TOOLS one rendering) - #5635

Merged
joelteply merged 10 commits into
canaryfrom
fable/one-rendering
Oct 31, 2026
Merged

joelteply merged 10 commits into
canaryfrom
fable/one-rendering

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

How it serves the minds: consistent results mean fewer failed and repeated calls (Joel: "Formalized and robust consistent results fed back to our agents are just as important as the calls themselves"). HER-TOOLS, "One rendering", first slice; path step 2.

Change

  • New tool_executor/answer.rs: render produces line 1 as <ok|running|failed|refused> <tool>(<identifying args>)[ <cause>], then the body, then a wake: line when the call became a task.
    • without_empty_fields drops null and empty top-level fields, so a success no longer opens {"error":null.
    • exit_cause puts the exit code on line 1.
  • command_executor: both arms build their text through it. The withheld-verb refusal loses its second frame (`x` failed:), and the refusal probe carries the whole reason (no head cut).
  • Why the frame is in the text: her tool message reaches llama as {role: tool, tool_call_id, content} (request_body.rs:466-480), with no is_error on that wire. Qwen's template renders results as bare <tool_response> blocks with no call id, so in a parallel batch only the result's own words tie it to its call.

Measured (before)

M5, 10-30 05:55Z to 10-31 04:01Z, frictions.py (in ~/.continuum/evidence/2026-10-31-tool-audit/, with the baseline):

  • 6.9% of calls failed;
  • 32.0% were wasted (failed, plus identical repeats, plus bad polls);
  • 302 calls per code write;
  • three failure formats, and 91 successes opening {"error":null.

Prediction (hour read after deploy)

The failed share falls, and so do repeats of a call whose result she misread. No new failure class.

Tests

  • continuum-cognition --lib 952/954 at the first commit (M5, --features metal, 05:09Z). The 2 failures pinned the deleted prefixes, and are restated against the one frame.
  • tool_executor 41/41 at the head.
  • source-hygiene ratchets clean.

Follow-up (named): open views should take their scalars from the typed value at execution rather than re-parsing the rendered text (result_scalars reads two lines today, so it keeps working). #5630 must keep that two-line read.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply

Copy link
Copy Markdown
Contributor Author

Review of #5635 at exact head fe107fb (Cormac): the right first slice of 'one rendering', and the case for a text frame is solid (no is_error on her wire; Qwen's template drops call ids). One blocker and two follow-ups that need owners.

Blocker: line 1 can break. status_line echoes identifying values raw (Value::String(text) => format!("{key}={text}")). command/cmd is in IDENTIFYING, and her shell commands are multi-line whenever she writes a heredoc or a script, so the script spills into what follows and "line 1, always" stops being true for exactly the calls that fail most. The shape rule for this already exists: act_observe::recency::render_call_args, where a single-line value is shown whole and a multi-line value as <N lines, M chars, #hash: in your call>. My WM slice (card c537d687, local, landing next) makes it the one call renderer (Observation::call_line, shared by the ledger, the recency trace and the summary part). Please render line 1's arguments through that same rule, so there's one rendering of a call, not two that can disagree. A test with a multi-line command should pin it.

Follow-ups (fine after this PR, but each needs an owner now)
2. IDENTIFYING is a central list. A hand-kept array of argument names deciding what every command echoes is the registry anti-pattern CLAUDE.md forbids: add a command and you must edit this list or it echoes nothing. The owner is the command, declared beside EFFECT (invariant 4 adds CommandSpec::EFFECT; an IDENTIFYING: &[&str] const there with an empty default would sit beside it, snapshotted on CommandDescriptor). Card it under HER-TOOLS T3?
3. The refusal's kind is parsed from prose (raw.split_once('[')). The kind should come from the typed CommandError, never from scanning its rendered text. Same slice as 2.

Also noting, so the slices stay honest: the closed status set here is ok|running|failed|refused; HER-TOOLS' unchanged/already arrive with T3's Answer, and the results_outside_the_answer ratchet isn't in this PR yet.

The rest I'd keep: without_empty_fields (no more {"error":null openings), the refusal framed once, the probe reason no longer cut at 240, and the wake: footer.

joelteply added a commit that referenced this pull request Oct 31, 2026
@joelteply
joelteply marked this pull request as draft October 31, 2026 05:28
joelteply added a commit that referenced this pull request Oct 31, 2026
…ead cuts, the WorkingMemoryFaculty deleted, the arbiter forwards every bid, no backwards compatibility (card c537d687) (#5637)

* WIP (not pushed): working memory sizes from the one owner, WorkingMemoryFaculty deleted, arbiter forwards every bid (card c537d687)

Open before push: observation.rs:358 intent_label (Fable: drop the because-clause, annotate open
views with call_line); vitals_emitter.rs:94 .min(100) and llm_deliberation_faculty.rs:716 OpenOptions
are flagged because this branch touches those files (literal edits); full cognition/mind suites
not yet run after the arbiter change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: drop the because-clause from results (Fable approved); open views carry her whole intent as their optional level; remove the dead capacity test constant

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: vitals gauge percentage saturates without a literal clamp; revert the doc-only touch of llm_deliberation_faculty.rs (its disk writer awaits the class handle)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: no backwards compatibility (Joel 2026-10-31: 'This is the first version'). The checkpoint carries her actions in one shape: receipt_heads, receipt_head_rooms, recent_results, result_scopes and evicted_pointers (the previous build's projection) are deleted with the legacy restore path and written_pointer; checkpoint adoption validates the records; the tests of rollback and pre-records restores are deleted

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: observation::call_args, the one argument renderer (Observation::call_line uses it; #5635's status line will)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: the provenance test stops asserting the old checkpoint tuple format

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: recent_results stays until checkpoint adoption moves onto its disk class handle (card 2b326931); adoption untouched

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: no retirement by order (Codex on #5637). A finished dispatch stays until the submitted render receipt acknowledges it; an act recorded later proves nothing about an optional source being sent. retire_perceived_dispatches is deleted; the 16-handle cap stays gone

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: drop the Faculty import the deleted faculty left unused (warning ratchet 14 -> 13)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: a record's line and summary stay in the memory owner's account (Codex on #5637)

ActionRecord::resident_bytes charged only the resident body, but a ledger line renders a
single-line argument whole and outlives every shed, so a large write's payload stayed in RAM
outside the account after its body was reported shed. resident_bytes now charges every text
the record owns (line, summary, body); body_bytes is what a shed releases, and shed
candidates and collapse_over count it. The reporter's pinned charge (resident - movable)
thus carries the lines, with no cap and no clip.

Regression: a_whole_single_line_argument_stays_in_the_memory_owners_account_after_a_shed
(a 64 KiB single-line content argument; a shed releases exactly its body, the line stays
charged through a checkpoint roundtrip, the handle reachable). Mutation-proved: charging
the body alone fails it. Reporter and trail fixtures add the pinned line bytes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WM slice: drop the Faculty import wake_backlog's test no longer uses (a test-profile warning the lib ratchet does not count)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
joelteply and others added 8 commits October 31, 2026 06:33
… on line 1, then the body (HER-TOOLS, one rendering, first slice)

Before: a refusal read `code/shell-poll: [invalid] …`, a withheld verb `` `work/review` failed: … ``,
and a success was JSON that often opened `{"error":null,…}` (code/search, 91 times in a day),
which reads like a failure to a model skimming its first line. On the M5 (10-30 05:55Z to 10-31
04:01Z) 6.9% of her calls failed and 32% were wasted (failed, identical repeats, bad polls).

- tool_executor/answer.rs: `render` (line 1 `<ok|running|failed|refused> <tool>(<identifying
  args>)[ <cause>]`, then the body, then `wake:` when the call became a task), with
  `without_empty_fields` (null and empty top-level fields leave the body) and `exit_cause`.
- command_executor: both arms (a command's answer and a refusal) build their text through it;
  nothing else frames a tool result.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…_args (#5637's one renderer, re-exported by its consumer); the refusal probe carries the whole reason

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the fable/one-rendering branch from 14ddb53 to 21f99b9 Compare October 31, 2026 11:35
@joelteply
joelteply marked this pull request as ready for review October 31, 2026 11:35
…efusal's line 1 carries no cause scanned from its message: its kind arrives typed with the verb macro (Codex on #5635)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

REQUEST CHANGES on #5635 at exact head 3c21a23 (Cormac). One contract break; the rest reads right.

  1. "ok" is claimed for a verdict nobody asserted. In command_executor.rs (the Ok(mut value) arm), status is Failed if verdict.failed(), Running if verdict.running(), else Ok. That else covers ActVerdict::Undecodable and ActVerdict::Unprojected. The kernel's own contract (sdk_codegen/command.rs:177): "Undecodable is deliberately NOT a success", and the variant doc says schema drift "must never be quietly rendered as success". The outcome_undecodable probe a few lines up says "NO outcome is claimed", then line 1 of her result says ok. She reads line 1 first, so this is the exact misreading this PR exists to remove, pointed the other way.
    • Fix: Ok only for verdict.succeeded(). Undecodable needs its own word from the closed set; it ran, but its result couldn't be read, so unread or similar, with the probe's reason as its cause.
    • For Unprojected (a command that never declared a verdict, most of them today), decide explicitly. ok there means "the transport returned", which is honest only if the doc says so. A separate word (e.g. done) keeps "ok" meaning "the command said it succeeded". Your call, but write it in Status's doc so line 1 means one thing.
    • Please add a test that an Undecodable result does not open with ok.

Verified as right:

  • The zip is safe: dispatches is calls.iter().map(...) (command_executor.rs:546) and join_all keeps order, so .zip(calls.iter()) pairs exactly and nothing drops.
  • No Value::Null stand-in remains: the refusal probe carries the whole reason, and a refusal's line 1 claims no scanned cause.
  • One renderer: heredocs go through act_observe::call_args, so line 1 stays one line.

Not blocking, named: IDENTIFYING is a central list of argument names, which is what #[identifying] on the verb macro (HER-TOOLS T3) replaces. The doc should say it's interim and name that card.

…ve; an undecodable result reads 'unreadable' (schema drift, never a success) and a command that declares no outcome reads 'ran' (Cormac on #5635)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE #5635 at exact head abc1be8 (Cormac). I read the delta from 3c21a23 (+36/-8, two files). The executor's if/else is replaced by Status::of(verdict), an exhaustive match: Declared(Succeeded) → ok, Failed → failed, Running → running, Undecodable → unreadable, Unprojected → ran. Because it's exhaustive, a new verdict can't silently fall into ok, which is the property that matters. only_an_asserted_success_reads_ok pins all five. The Status docs now say what each word claims. Merge on green CI at this head. The IDENTIFYING list stays interim until #[identifying] (HER-TOOLS T3) replaces it.

@joelteply
joelteply merged commit 67fa618 into canary Oct 31, 2026
17 checks passed
@joelteply
joelteply deleted the fable/one-rendering branch October 31, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant