You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Canary: prove which served text each host reads before its next action #5
What: A canary per host and seam shows which served text each agent host reads before its next action inside Chromeria. Why: Hook context can arrive after the action it was meant to precede, so no serving outcome can be trusted until delivery is observed per host and seam. So what: An agent runs the canaries and records the seam table; serving work builds on the seams it proves.
A table, for Claude Code, Codex, Grok Build and OpenCode running under Chromeria, of each seam (user message, tool result, tool failure, pre-tool deny, before-done) with the observed result: whether the model quotes a served canary string before its next action, the delivery latency, and any size limit or spill behavior seen.
Elon record
Requirements and who asked: proof of delivery before trusting any ignored label (all three gap reviewers); serving before "done" restored (user); Codex post-tool context to be settled by a canary instead of open research (gap review synthesis).
Deleted: further desk research on Codex delivery (source and CLI probes already exist); a Chromeria approval-path change.
Bottleneck: every later serving outcome depends on knowing which seams deliver before the next decision.
Checked myself: the before-action delivery research (CLI probes in all four harnesses: deny then retry works; added context arrives after the action; hooks already fire in Chromeria-launched Codex, Claude Code and Grok sessions).
Acceptance criteria
Every host and seam pair has an observed result (delivered before next action, delivered after, discarded, or no seam), each from a canary run inside Chromeria.
The before-done seam is probed on every host that has one.
Hook configuration changes on each machine are recorded in the user's runbook and reverted or kept as stated.
Non-goals
Building the serving server or any lane.
Probing models beyond one ordinary model per host.
Blocked by
None
Required proof
The seam table with the run evidence for each cell, posted on this Issue.
What: All four hosts were canaried inside Chromeria; the seam table and the canary are in PR #21. Why: Serving (#3) needs observed delivery per host and seam before it builds on any seam. So what: The user reviews and merges #21. #3 should replace "Grok Build post-tool events only" with Grok PreToolUseadditionalContext (see below).
Run evidence per cell
Each cell: the token the hook served, then what happened. "Quoted before" means the model's message quoting that token came before its next tool call or end of turn. Each run was read in the Chromeria timeline, the hook log, and the host's own session record (Claude Code transcript, Codex rollout, Grok chat_history.jsonl, OpenCode database). Chromeria 0.0.45, 2026-10-12.
Claude Code 2.1.292, claude-haiku-4-5
User message: UserPromptSubmit context CMDCANARY-PROMPT-E362, quoted before the first command.
Tool result: PostToolUse context CMDCANARY-RESULT-8DC7, quoted before the next command.
Tool failure: ls exit 1 fired PostToolUseFailure; CMDCANARY-FAILURE-2DFE quoted before the next command.
Pre-tool deny: CMDCANARY-DENY-7E62 in the tool error PreToolUse:Bash hook error: ..., quoted, then the retry passed.
Before done: Stop block CMDCANARY-DONE-D9FC, quoted in the continuation; the second stop passed.
Size: 11.7 KB context became <persisted-output> "Output too large (11.7KB)" with a 2 KB preview and a file path. BIGHEAD quoted, BIGTAIL not seen.
Run 1, plain folder: no project hook fired at all. Grok loads project hooks only inside a git repository with folder trust.
Run 2, git folder, GROK_FOLDER_TRUST=0. Grok sends snake_case event names (pre_tool_use); the hook was fixed for that.
User message: CMDCANARY-PROMPT-9DB5 was served but is absent from the session history; the model wrote "no canary". Discarded.
Tool result: PostToolUse context CMDCANARY-RESULT-64BF, -6394, -3FB8 all absent from history; "no canary" each time. Discarded. A direct grok -p run showed the same.
Tool failure: ls exit 1 fired PostToolUse, not PostToolUseFailure.
Pre-tool deny: CMDCANARY-DENY-42F9 quoted, then the retry passed.
Before done: CMDCANARY-DONE-9D51 quoted.
Run 3, adding PreToolUseadditionalContext on every canary command:
Tool result: CMDCANARY-PRECTX-948D arrived with the result and was quoted before the next command.
Tool failure: CMDCANARY-PRECTX-BCB8 arrived with the failed ls result and was quoted before the next command.
Deny CMDCANARY-DENY-8428 and before-done CMDCANARY-DONE-1687 quoted again.
Size: context clipped at 10,000 characters; BIGHEAD quoted, BIGTAIL absent from history.
OpenCode 1.18.31, opencode/big-pickle
User message: text part added in experimental.chat.messages.transform, CMDCANARY-PROMPT-04D9, quoted first.
Tool result: appended to the output in tool.execute.after, CMDCANARY-RESULT-1D84, quoted before the next command. The text is visible in the Chromeria tool output.
Tool failure: ls exit 1 still ran tool.execute.after (metadata.exit 1); CMDCANARY-FAILURE-EED6 quoted.
Pre-tool deny: error thrown in tool.execute.before, CMDCANARY-DENY-33E3 quoted, then the retry passed.
Before done: no seam. The plugin API in 1.18.31 has no stop hook.
Size: all 11,951 appended characters arrived; BIGHEAD and BIGTAIL both quoted.
The model wrote tokens as CMD CANARY-... with a space; counted as quoted.
Hook overhead: about 20 ms per fire (median of 20). Hook-exit-to-quote times per cell are in canary/README.md.
Machine changes
Two temporary Chromeria provider instances (codexCanary with a temporary Codex home, grokCanary with GROK_FOLDER_TRUST=0) were added for the runs and removed afterwards. The copied Codex credential was deleted. Real Codex, Claude Code, Grok and OpenCode configs and Grok's trusted-folder list were not changed. Recorded in the user's runbook.
Limits
One run per host and seam with one model per host; shell commands only; Claude Code and Codex ran the hook before the Grok-only fixes, which do not change their behavior.
What: The seam table with per-cell delivery times, completing the run evidence in the comment above. Why: Review of #21 found the times and the table were only in canary/README.md, not on this Issue. So what: No action needed beyond reviewing #21.
Each cell: the served token, the result, and the time from the hook's exit (hook log t_end) to the model message quoting it (Chromeria timeline for Claude Code and Grok, Codex rollout, OpenCode database part times). The time is mostly model latency; the hook itself takes about 20 ms of wall time, Python startup included (median of 20 /usr/bin/time runs).
Host
User message
Tool result
Tool failure
Pre-tool deny
Before done
Claude Code
PROMPT-E362 delivered before, 3.5 s
RESULT-8DC7 delivered before, 1.3 s
FAILURE-2DFE delivered before, 1.5 s
DENY-7E62 delivered before, 1.9 s
DONE-D9FC delivered before, 1.4 s
Codex
PROMPT-1CF5 delivered before, 2.5 s
RESULT-4EA6 delivered before, 2.7 s
via PostToolUse: RESULT-9DD4 delivered before, 3.0 s
DENY-7B16 delivered before, 2.5 s
DONE-BDB6 delivered before, 2.5 s
Grok Build
PROMPT-9DB5, PROMPT-43BB discarded
PostToolUseRESULT-64BF, -6394, -3FB8 discarded; PreToolUsePRECTX-948D delivered before, 3.0 s
PreToolUsePRECTX-BCB8 delivered before, 4.8 s
DENY-42F9 delivered before, 2.2 s (run 3: DENY-8428, 2.2 s)
DONE-9D51 delivered before (run 3: DONE-1687, 4.2 s)
OpenCode
PROMPT-04D9 delivered before, 5.4 s
RESULT-1D84 delivered before, 2.7 s
FAILURE-EED6 delivered before, 2.4 s
DENY-33E3 delivered before, 2.8 s
no seam
Size, at the tool-result seam with about 12,000 characters: Claude Code BIGHEAD-583C quoted, BIGTAIL-FC86 spilled to a file (2 KB preview); Codex BIGHEAD-AB79 and BIGTAIL-9D25 both quoted after a middle cut of a 2,988-token context; Grok BIGHEAD-5969 quoted, BIGTAIL-491C clipped at 10,000 characters; OpenCode BIGHEAD-D0AE and BIGTAIL-5B2E both quoted.
Correction to the Grok run 1 note above: that run's Grok process had GROK_FOLDER_TRUST=0 in its environment (read from the running process), so folder trust was off; the plain folder (no git repository) is what kept project hooks from loading. A direct grok -p run with the same variable showed the same: no hook in a plain folder, hooks firing after git init. /hooks-trust was not tested.
Activity
lukemaj commentedon Oct 12, 2026
What: All four hosts were canaried inside Chromeria; the seam table and the canary are in PR #21.
Why: Serving (#3) needs observed delivery per host and seam before it builds on any seam.
So what: The user reviews and merges #21. #3 should replace "Grok Build post-tool events only" with Grok
PreToolUseadditionalContext(see below).Run evidence per cell
Each cell: the token the hook served, then what happened. "Quoted before" means the model's message quoting that token came before its next tool call or end of turn. Each run was read in the Chromeria timeline, the hook log, and the host's own session record (Claude Code transcript, Codex rollout, Grok
chat_history.jsonl, OpenCode database). Chromeria 0.0.45, 2026-10-12.Claude Code 2.1.292,
claude-haiku-4-5UserPromptSubmitcontextCMDCANARY-PROMPT-E362, quoted before the first command.PostToolUsecontextCMDCANARY-RESULT-8DC7, quoted before the next command.lsexit 1 firedPostToolUseFailure;CMDCANARY-FAILURE-2DFEquoted before the next command.CMDCANARY-DENY-7E62in the tool errorPreToolUse:Bash hook error: ..., quoted, then the retry passed.StopblockCMDCANARY-DONE-D9FC, quoted in the continuation; the second stop passed.<persisted-output>"Output too large (11.7KB)" with a 2 KB preview and a file path.BIGHEADquoted,BIGTAILnot seen.Codex 0.160.1,
gpt-6-astralow (temporaryCODEX_HOME)CMDCANARY-PROMPT-1CF5, recorded as a developer message right after the user message; quoted first.CMDCANARY-RESULT-4EA6, developer message after the output; quoted before the next command.PostToolUseFailureevent in Codex;lsexit 1 firedPostToolUse,CMDCANARY-RESULT-9DD4quoted before the next command.CMDCANARY-DENY-7B16quoted, then the retry passed.Stopblock became a hook prompt;CMDCANARY-DONE-BDB6quoted.Warning: truncated output (original token count: 2988));BIGHEADandBIGTAILboth quoted.Grok Build 1.0.13,
grok-build(three Chromeria runs)GROK_FOLDER_TRUST=0. Grok sends snake_case event names (pre_tool_use); the hook was fixed for that.CMDCANARY-PROMPT-9DB5was served but is absent from the session history; the model wrote "no canary". Discarded.PostToolUsecontextCMDCANARY-RESULT-64BF,-6394,-3FB8all absent from history; "no canary" each time. Discarded. A directgrok -prun showed the same.lsexit 1 firedPostToolUse, notPostToolUseFailure.CMDCANARY-DENY-42F9quoted, then the retry passed.CMDCANARY-DONE-9D51quoted.PreToolUseadditionalContexton every canary command:CMDCANARY-PRECTX-948Darrived with the result and was quoted before the next command.CMDCANARY-PRECTX-BCB8arrived with the failedlsresult and was quoted before the next command.CMDCANARY-DENY-8428and before-doneCMDCANARY-DONE-1687quoted again.BIGHEADquoted,BIGTAILabsent from history.OpenCode 1.18.31,
opencode/big-pickleexperimental.chat.messages.transform,CMDCANARY-PROMPT-04D9, quoted first.tool.execute.after,CMDCANARY-RESULT-1D84, quoted before the next command. The text is visible in the Chromeria tool output.lsexit 1 still rantool.execute.after(metadata.exit1);CMDCANARY-FAILURE-EED6quoted.tool.execute.before,CMDCANARY-DENY-33E3quoted, then the retry passed.BIGHEADandBIGTAILboth quoted.CMD CANARY-...with a space; counted as quoted.Hook overhead: about 20 ms per fire (median of 20). Hook-exit-to-quote times per cell are in
canary/README.md.Machine changes
Two temporary Chromeria provider instances (
codexCanarywith a temporary Codex home,grokCanarywithGROK_FOLDER_TRUST=0) were added for the runs and removed afterwards. The copied Codex credential was deleted. Real Codex, Claude Code, Grok and OpenCode configs and Grok's trusted-folder list were not changed. Recorded in the user's runbook.Limits
One run per host and seam with one model per host; shell commands only; Claude Code and Codex ran the hook before the Grok-only fixes, which do not change their behavior.
canary: quote paths, make Codex trust rerunnable, tighten claims (#5)
lukemaj commentedon Oct 12, 2026
What: The seam table with per-cell delivery times, completing the run evidence in the comment above.
Why: Review of #21 found the times and the table were only in
canary/README.md, not on this Issue.So what: No action needed beyond reviewing #21.
Each cell: the served token, the result, and the time from the hook's exit (hook log
t_end) to the model message quoting it (Chromeria timeline for Claude Code and Grok, Codex rollout, OpenCode database part times). The time is mostly model latency; the hook itself takes about 20 ms of wall time, Python startup included (median of 20/usr/bin/timeruns).PROMPT-E362delivered before, 3.5 sRESULT-8DC7delivered before, 1.3 sFAILURE-2DFEdelivered before, 1.5 sDENY-7E62delivered before, 1.9 sDONE-D9FCdelivered before, 1.4 sPROMPT-1CF5delivered before, 2.5 sRESULT-4EA6delivered before, 2.7 sPostToolUse:RESULT-9DD4delivered before, 3.0 sDENY-7B16delivered before, 2.5 sDONE-BDB6delivered before, 2.5 sPROMPT-9DB5,PROMPT-43BBdiscardedPostToolUseRESULT-64BF,-6394,-3FB8discarded;PreToolUsePRECTX-948Ddelivered before, 3.0 sPreToolUsePRECTX-BCB8delivered before, 4.8 sDENY-42F9delivered before, 2.2 s (run 3:DENY-8428, 2.2 s)DONE-9D51delivered before (run 3:DONE-1687, 4.2 s)PROMPT-04D9delivered before, 5.4 sRESULT-1D84delivered before, 2.7 sFAILURE-EED6delivered before, 2.4 sDENY-33E3delivered before, 2.8 sSize, at the tool-result seam with about 12,000 characters: Claude Code
BIGHEAD-583Cquoted,BIGTAIL-FC86spilled to a file (2 KB preview); CodexBIGHEAD-AB79andBIGTAIL-9D25both quoted after a middle cut of a 2,988-token context; GrokBIGHEAD-5969quoted,BIGTAIL-491Cclipped at 10,000 characters; OpenCodeBIGHEAD-D0AEandBIGTAIL-5B2Eboth quoted.Correction to the Grok run 1 note above: that run's Grok process had
GROK_FOLDER_TRUST=0in its environment (read from the running process), so folder trust was off; the plain folder (no git repository) is what kept project hooks from loading. A directgrok -prun with the same variable showed the same: no hook in a plain folder, hooks firing aftergit init./hooks-trustwas not tested.canary: note Grok pre-tool text precedes the result; escape Codex tru…
canary: per-host seam canary and observed seam table (#21)