OpenCode / hy4-flash-free
Manual Note vs. Session Log Audit: 44m 51s Exact Match, hy4-flash-free Model ID, 8 Agent Commits & Accidental 5.02 MB erl_crash.dump in S2 Read field notes ↓
- Outcome
- 7/7 slices
- All 7 specification slices passed · 53/53 tests
- Time Elapsed
- 45m
- Range 14m–1h 51m (28 runs)
- Estimated Cost
- $0.00
- OpenCode Limited-Time Free Tier (Nov 2026 · paid rate TBD)
Test suite & secondary run metrics
Processed 19.95M tokens across 227 inference turns in 45m; recovered from 3 tool errors across 229 executions.
- Test Suite
- 53/53
- 100% passed (110.5s)
- Total Tokens
- 19.95M
- 98.14% cache hit · 369.2k uncached · 116.1k out
- LLM & Tool Calls
- 227 turns
- 229 tool executions (3 errors)
- Peak Context
- 157.7k peak
- 1,730 → 157,744 prompt tokens; 158,227 total; 15.04% out of 1.05M
- Git Commits
- 8
- Recorded in commit log below
Finished in 110.5 seconds (0.08s async, 110.4s sync) — 53 passed (111.2s at Step 219 in JSONL; mix format --check-formatted clean; mix credo: 57 checks on 23 files, 134 mods/funs, 0 issues)
Plan Completion / 7 of 7 Slices
+6 prep/wrap-up calls ↓- S1: PassedLaunch the CLI
- S2: PassedValidate arguments
- S3: Passed (Peak effort bottleneck)Send one bounded GET
- S4: PassedRun a paced five-second loop
- S5: PassedReport outcomes and exit codes
- S6: PassedReport timing
- S7: PassedHandle Ctrl-C
Field Notes / 4 Observations
Manual Note vs. Session Log Audit: 44m 51s Exact Match, hy4-flash-free Model ID, 8 Agent Commits & Accidental 5.02 MB
erl_crash.dumpin S2(3 points)- Exact Wall-Clock Match (
07:55–08:40 (44m51s)) Following the pre-runinitcommit (f9002b1at07:55:17 WIB),opencode v2.2.7started at2026-11-17T00:55:23.300Z(07:55:23.300 WIBinopencode.log), opened sessionses_e18ffa0b4ffeuFr1B92qKpBMO2at07:55:24.031 WIB, dispatched Step 1 at07:55:26.154 WIB(Line 1of20261117T005523Z.events.jsonl), completed Step 227 at08:40:14.711 WIB(Line 871,2,688.56s/44m 48.6stranscript span), and exited at08:40:14.802 WIBfor an exact CLI wall-clock of44m 51.5s(2,691.50s/45m). An earlier attempt inopencode-hy4-flash-free-free-high_20261117060400(ses_e19633dd1ffej519q1toSMZtGa,06:06:35–06:39:07 WIB) was manually interrupted during S4 after32m 31s. - Model Slug vs. Folder Name (
hy4-flash-freevs.opencode-hy4-flash-free-free-high) While the workspace folder duplicated-free-free,opencode.log(--model opencode/hy4-flash-free#high) andopencode.db(session_v2.model+models-dev:v2:catalog) confirm the canonical model ishy4-flash-free(canonical_id: "tencent/hy4-flash", released2026-11-16,1,048,576context window,variant: "high"). - 8 Agent Commits + S1 Amend Recovery & Accidental 5.02 MB
erl_crash.dumpin S2 (3d6947a) All 8 agent commits (572666e→71aa11a) plus pre-runf9002b1(init),53/53passing tests (110.5spost-run /111.2sat Step 219, Line 839), and0Credo issues (57 checks on 23 files, 134 mods/funsat Step 218, Line 836) match the manual note. At Step 43 (Line 177),git add -Ainitially staged the compiledcbescript andrecords/20261117T005523Z.*into7e6eab8; the agent spotted this viagit show --statat Step 44 (Line 180), added/cband/records/to.gitignoreat Step 45, and amended572666ecleanly at Step 46 (Line 189). However, during S2 at Step 62 (Line 250,08:02:56 WIB), pipingmix test 2>&1 | head -20closed the pipe while ERTS was writing:test_load_filterswarnings to:standard_error, triggering anepipeboot crash that wrote a5,021,257-byte (167,416-line)erl_crash.dumpinto the working tree—whichgit add -Aat Step 68 (Line 275) committed inside3d6947a.
- Exact Wall-Clock Match (
Zero-Signal Terminal Mode (stty -isig + Raw 0x03 Stdin Watcher) Eliminating BEAM Boot Ctrl-C Races Across All PTY Holdout Probes(3 points)
- Empirical S1 PTY Reconnaissance (
Steps 11–29,Lines 47–123) In S1, the agent tested:os.set_signal(:sigint, :handle)(Step 12,ArgumentError) and ran disposable Pythonpty.fork()probes (/tmp/cbprobe/run.py) showing that default BEAM escripts open theBREAK: (a)bortmenu onCtrl-C(Step 19) while+Bi/-noshellescripts still terminate or fail to open/dev/ttyviaSystem.cmd("stty", ...)inside child processes (Step 28,/dev/tty: Device not configured). - Line-Discipline
stty -isigWrapper +CapyBench.Terminal(2f2a9dd) Instead of forwardingSIGUSR1/SIGUSR2asynchronously from a shell trap (which risks killing the BEAM during its ~150 ms startup window iftrap '' USR1is omitted),./cbsynchronously runsstty -isig -icanon -echo 2>/dev/nullon the operator's controlling terminal before invokingcb.escript, then restoresstty isig icanon echo 2>/dev/nullon exit. Inside Elixir,CapyBench.Terminalspawns a reader (IO.binread(:stdio, 1)) that matches byte<<3>>(0x03) and callsGenServer.cast(runner_pid, :interrupt). - 5/5 Live PTY Holdout Verification (Including 50 ms Boot Window) Empirical foreground PTY probes against
./cbpassed every scenario with exit130and a valid partial summary:50 msand150 msBEAM boot-windowCtrl-C(Started: 1, HTTP responses: 1, Elapsed: 0.02–0.03 s—because kernel TTY input buffers0x03whileISIGis disabled untilCapyBench.Terminalstarts reading),600 mspacingCtrl-C(Started: 4, HTTP responses: 4, Elapsed: 0.35 s),500 msCtrl-Cduring an800 msslow request (Elapsed: 0.84 s, p50 834 ms), and500 msCtrl-Cduring a3,000 msstalled request (settled at 2.02 s, Transport failures: 1). On a full un-interrupted 5s local keep-alive run (50starts),Scheduler.finished?/2returns as soon as the 50th response completes atElapsed: 4.95 s(0.05 sbefore the5.00 swindow boundary).
- Empirical S1 PTY Reconnaissance (
Mint HTTP/1.1 + OTP 28
:sslIntegration & Fixing a Subtle Post-Stream Connection Struct Reuse Bug in S4(2 points)- Mint
~> 1.6+ OTP 28:sslServer Handshake Fixes (Steps 69–136,Lines 277–526) Rather than wrapping:httpcor raw sockets, the agent added{:mint, "~> 1.6"}(justified inmix.exsfor redirect-free, retry-free streaming HTTP/1.1 with caller-owned connection state) and{:credo, "~> 1.7"}. While buildingCapyBench.TestServerandCapyBench.TLSHelperon Erlang/OTP 28 (erts-16.4.0.7) and LibreSSL3.3.6, it resolved three real compatibility issues: (1):ssl.sockname/1vs.:inet.sockname/1on TLS listen sockets (Steps 87–89), (2) LibreSSL requiring explicitbasicConstraints = critical, CA:TRUE+keyUsage = critical, keyCertSign, cRLSignX.509 v3 CA extensions (Steps 105–112), and (3) OTP 28 removing deprecated:ssl.ssl_accept/2in favor of:ssl.handshake/2(Steps 117–119). - Diagnosing & Fixing Every-Other-Request Timeouts on Reused Mint Connections (
Steps 149–156,Lines 573–606): During S4 integration testing (test/capy_bench/loop_integration_test.exs), the agent observedStarted: 6 | HTTP responses: 3 (200: 3) | Transport failures: 3with arrival intervals[84, 2004, 99, 2003, 102] ms—every second request on a keep-alive connection was timing out at2,000 ms. TracingCapyBench.Runner.handle_responses/3with/tmp/dbgsloop.exsrevealed that{:done, ref}calledcomplete_response(acc)with the pre-Mint.HTTP.stream/2acc.connstruct (whose socket remained passive) instead of the updatedconnreturned byMint.HTTP.stream(conn, message). Passing%{acc | conn: conn}(Line 605) immediately restored 50/50 single-connection keep-alive reuse.
- Mint
58% Faster & 73% Fewer Tokens Than inkling-2-small-free on OpenCode's Limited-Time Free Tier (227 Steps, 98.14% Cache Hit Rate)(3 points)
- Controlled OpenCode Harness Comparison (
hy4-flash-freevs.inkling-2-small-free) Under the exact samerun_opencode.fishharness configuration (OpenCode v2.2.7, tools restricted toread, shell, edit, write, billed$0.00during OpenCode's limited-time free access),hy4-flash-freefinished all 7 stages in44m 51sand227steps (19.95Mtotal tokens,157.7kpeak context) compared toinkling-2-small-free's105m 58sand390steps (73.45Mtotal tokens,378.4kpeak context)—cutting wall-clock time by57.7%, LLM turns by41.8%, and cumulative token volume by72.8%. - 98.14% Prefix Cache Hit Rate & Single Step-199 Cache Eviction Across
227steps (229tool calls; Steps 1–3 batched 2 tools/turn and Steps 4–226 executed 1 tool/turn),hy4-flash-freeread19,463,936cached tokens against369,208uncached input tokens (98.14%hit rate) and generated116,108output tokens (67,997reasoning +48,111visible/tool tokens). Prefix caching held steady across 225 of 226 post-initial steps, with only a single transient cache miss at Step 199 (Line 763:142,927uncached input,256cached) before immediately resuming142,848cached tokens at Step 200. - 53.8% Inference vs. 46.2% Tool Wall-Clock & Only 3
editErrors From per-message timestamps inopencode.db, LLM inference took24m 05.2s(1,445.2s, avg6.37s/step) while tool execution took20m 42.4s(1,242.4s), dominated by full-suitemix testruns (111.2sat Step 219). Out of229tool calls (116 shell,67 edit,32 write,14 read),shellhad0tool errors andedithad only3minor errors (Line 345test_server.exsvs.exextension typo,Line 421tls_helper.exoldStringmismatch, andLine 694target.exoldStringmismatch), each fixed on the next step.
- Controlled OpenCode Harness Comparison (
Slice / Phase Breakdown
Slice / Phase Breakdown / 8 Phases
Step Range spans transcript events (LLM + tool + system turns) · LLM Calls count completed model inference turns
| Slice / Phase | Step Range | LLM Calls | Thinking Tokens | Estimated Cost |
|---|---|---|---|---|
S1 PassPreparation + S1: CLI help, foreground PTY Ctrl-C probes & Credo setup (572666e) | 1–46(46 steps) | 46 | 18,992 | $0.00 (20%) |
S2 PassS2: URL & argument validation before networking (3d6947a) | 47–68(22 steps) | 22 | 5,267 | $0.00 (10%) |
S3 PassS3: Bounded Mint HTTP/1.1 + TLS single GET, timeouts & streaming (dfaf9f8) | 69–136(68 steps) | 68 | 18,199 | $0.00 (30%)Peak |
S4 PassS4: Paced 5s loop, post-stream Mint conn retention & reuse (d3da644) | 137–161(25 steps) | 25 | 11,491 | $0.00 (11%) |
S5 PassS5: HTTP status classes, transport failure counts & exit codes (ae7938d) | 162–168(7 steps) | 7 | 1,377 | $0.00 (3%) |
S6 PassS6: Elapsed time & completed-response p50/p95 latency (0df8910) | 169–189(21 steps) | 21 | 2,223 | $0.00 (9%) |
S7 PassS7: stty -isig wrapper, raw 0x03 stdin watcher & PTY Ctrl-C tests (2f2a9dd) | 190–221(32 steps) | 32 | 9,154 | $0.00 (14%) |
PostRelease verification: prod escript build, HTTP/HTTPS & PTY sign-off (71aa11a) | 222–227(6 steps) | 6 | 1,294 | $0.00 (3%) |
| Total (8 phases) | 227 steps | 227 | 67,997 | $0.00 |
Tokens, Cache & Cost
Tokens, Cache & Cost / OpenCode Limited-Time Free Tier
| Component | Tokens | Rate | Estimated Cost |
|---|---|---|---|
| Input (uncached) | 369,208 | $0.00 / 1M (limited-time free) | $0.00 |
| Cached (cacheRead) | 19,463,936 | $0.00 / 1M (limited-time free) | $0.00 |
| Output (incl. 67,997 reasoning) | 116,108 | $0.00 / 1M (limited-time free) | $0.00 |
| Total | 19,949,252 | — | $0.00 (OpenCode limited-time free tier, Nov 2026) |
Calls & Tool Breakdown
Calls & Tool Breakdown / Tool Loop
- LLM Inference Turns
- 227completed agent_response steps
- Tool Executions
- 229226 succeeded· 3 non-zero / error
- tool/shell116(51% · 116 ok)
- tool/edit67(29% · 64 ok, 3 err)
- tool/write32(14% · 32 ok)
- tool/read14(6% · 14 ok)
Command & Interface Used
Command / Interface Used / CLI
opencode run --standalone --format json --thinking --auto --archived --model opencode/hy4-flash-free#high < PROMPT.mdRun window: 07:55:23–08:40:15 WIB (44m 51.5s / 2,691.5s CLI wall-clock in opencode.log, 44m 48.6s in events.jsonl; 07:55–08:40 / 44m51s in manual note; preceded by an interrupted 32m 31s run ses_e19633dd1ffej519q1toSMZtGa at 06:06:35–06:39:07 WIB) • Session ses_e18ffa0b4ffeuFr1B92qKpBMO2 (opencode / hy4-flash-free#high, canonical tencent/hy4-flash, OpenCode v2.2.7, 227 steps, 0 compactions)
Git Commits
Git Commits / 9 Checkpoints
Author: Riza Fahmi · Timestamps relative to post-run capture
71aa11aRecord release verification resultsf9002b1init