Skip to content

docs: correct the latency reading, and cover the new agentop surfaces - #2618

Merged
mrsabath merged 6 commits into
mainfrom
docs-latency-fix
Oct 7, 2026
Merged

mrsabath merged 6 commits into
mainfrom
docs-latency-fix

Conversation

@mrsabath

@mrsabath mrsabath commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #2615. Corrections to the laptop and troubleshooting pages, checked against rossoctl/cortex v0.8.1, which is what the install one-liner delivers.

Corrections

Latency — my error in #2615. That PR described the whiskers as "the fastest and the slowest call" and told readers to read the upper one as the worst case. The code computes LatMeanMs ± LatStdDevMs (cmd/agentop/tui/usage_whiskers.go) — standard deviation, not extremes. And the usage charts keep no maximum, so the slowest call can sit above the top of the chart, and the chart does not show it, which is the whole of cortex#1026. The duration itself is recorded, on the event, and the Events view's sortable DURATION column is how you find the slow call — the page now gives the keys for that and the two limits (newest 2000 events; a chart opened from Sessions covers every session).

Rewritten to mean with ±1σ caps, with cautions that neither cap is an extreme: the upper cap is not a worst case, and a lower cap on the bottom row means mean − 1σ is near zero, not that σ ≥ mean. The worked example's "Slowest call" row became the LATENCY figure from the usage pane, which is the only window-wide latency number Cortex produces.

Stale abctl, and a ps grep that missed current installs. The two-installs section grepped ps for a bare authbridge-proxy while the binary is cortex now; the pattern now anchors on the binary followed by a flag, so tail -f of the log, a cortex.test binary and an --proxy .../cortex argument no longer match. The same section now reads ~/.cortex/proxy.log for the proxy's own lines (the plist and the unit redirect stdout and stderr there), scopes the supervisor notes to macOS, and says what Linux shows instead.

CA and trust-store corrections. The by-hand variable list names all four proxy variables (including the lowercase spellings) and $HOME rather than ~; the replacing CA variables point at bundle.crt; the Go note states that only Go ignores SSL_CERT_FILE on macOS and that git, curl and Python honour their variables; "Another program stopped working" names the most likely cause (a replacing variable pointed at ca.crt) and its grep catches GIT_SSL_CAINFO.

Additions

  • agentop configure covers three agents in v0.8.1 (claude-code, bob, bobshell), each row saying what the command actually writes, including CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC for Claude Code and the sudo System-keychain command Bob prints rather than runs. OpenCode gets its own paragraph: one background service sends all of its traffic and keeps the environment it started with, so agentop exec -- opencode routes nothing when the service already runs, and the routing outlives the command when exec started it. codex and opencode remain under agentop exec; configure opencode arrives with cortex#1243 and is marked VERIFY v0.9.0.
  • A missing CA is repaired by a restart, because the proxy mints the CA at boot; a keychain that trusted the old CA needs the command again.

Verified

Against v0.8.1 (a6cb1d77), the release the install one-liner delivers: the five loopback ports from the --local preset in cmd/cortex/local.go (47600 proxy, 47601 session API, 47602 statistics, 47603 transparent listener, 47604 health), the 30-second macOS restart ceiling from superviseMaxDelay (systemd instead retries every 10 s and gives up after 5 starts in 300 s), the 97-column money-column threshold, the CONTEXT(1M) heading, and the whisker glyphs and empty-bucket strings. cortex#1246 moves the heading to CTX(1M) and the threshold to 93, and a VERIFY v0.9.0 marker lists every place to change when that release is out.

Issues

Advances cortex#1236 and cortex#1237 (the agentop configure surfaces). cortex#963 stays open — still blocked on cortex#951 and the outside-reader pass.

Three corrections and two additions, all against cortex main as of today.

Latency — my own error in #2615. That PR said the whiskers were "the fastest
and the slowest call" and told readers to read the upper one as the worst
case. The code computes LatMeanMs +/- LatStdDevMs
(cmd/agentop/tui/usage_whiskers.go): standard deviation, not extremes. No
maximum is recorded anywhere in the pipeline, so the slowest call can sit
above the top of the chart with nothing on screen saying so -- which is the
whole of cortex#1026. Rewritten to mean with +/-1σ caps, with a caution that
the upper cap is not a worst case. The worked example's "Slowest call" row
became a spread, since Cortex does not record that figure.

Context column — CONTEXT(1M) is now CTX(1M), shortened in cortex#1246.
Three occurrences.

Stale abctl and a ps grep that misses current installs — the two-installs
section used `abctl service stop|install`, and grepped ps for
authbridge-proxy alone. The binary is `cortex` now; authbridge-proxy is only
the pre-rename name, and a machine carrying both generations is exactly what
that section is about, so match either.

New: `agentop configure` covers five agents (claude-code, bob, bobshell,
opencode, codex), so "Other agents" now names the command per agent instead
of sending everyone to set HTTP_PROXY by hand. And `agentop setup` with no
--from repairs an install, which is a better answer than "run the install
again" for a missing CA.

Also verified the two-installs section's own markers against main: all five
loopback ports come from the --local preset in cmd/cortex/local.go and the
30-second restart ceiling from superviseMaxDelay in cmd/cortex/supervise.go.
Both paths moved in the rename.

Refs rossoctl/cortex#963, rossoctl/cortex#1026, rossoctl/cortex#1236, rossoctl/cortex#1237

Signed-off-by: Mariusz Sabath <[email protected]>

@huang195 huang195 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. Several of the new instructions describe cortex main rather than the release the page installs, and the macOS CA advice is wrong for everything except Go. Each inline comment cites the cortex source at main (3f8f779c) and at v0.8.1.

The main issue: released or unreleased. laptop.md:39 says the one-liner installs the latest release, which is v0.8.1. Three things this PR documents exist only on main: agentop configure opencode (cortex#1243), agentop setup (#1245) and the CTX(1M) heading (#1246). On v0.8.1 they print "coming soon", fail as an unknown subcommand, and render as CONTEXT(1M). CONTRIBUTING's accuracy rule 2 says not to document unreleased behaviour. Holding the PR until the release that carries them also works, but then the 97-column threshold has to become 93 (sessions_pane.go:1583). The PR body says 97 "still holds", which is true only of v0.8.1.

Latency. The correction from "fastest and slowest" to mean ± 1σ is right, and the glyphs and the clipping explanation match usage_whiskers.go. Two claims built on top of it do not hold:

  • "Cortex records no maximum" / "does not record it yet": every call's duration is in the Events view's sortable DURATION column.
  • The worked example's new "±1σ spread" row is a per-session figure that Cortex does not produce, the same defect as the row it replaces.

Outside this diff, related: troubleshooting.md:156-160 has the same SSL_CERT_FILE note, ending in the same "anything else" sentence. troubleshooting.md:235 also says 97 columns. Lines 173-179's log show --predicate 'process == "cortex"' and journalctl --user -u cortex will not show the proxy's log lines, because the plist and the unit send stdout and stderr to ~/.cortex/proxy.log (cmd_service.go:178).

Author: mrsabath (MEMBER — maintainer)
Areas reviewed: Docs (checked against cortex source at main and v0.8.1, and against CONTRIBUTING's documentation standard)
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit plus a merge of main, signed off: yes
CI status: passing

Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/reading-the-numbers.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Two conflicts in docs/operate/troubleshooting.md, both from the
authbridge-proxy to cortex rename landing on main while this branch
edited the same lines.

- The VERIFY marker on "Two installs ... fight over the ports": kept
  both halves. main contributed the observed backoff sequence and the
  --local vs --config port split; this branch contributed the port
  enumeration and the note that both paths moved in the rename.
- The ps invocation: kept this branch's two-name grep. main narrowed it
  to `cortex` alone, but this section is about a machine carrying both
  generations, so the pre-v0.7.0 `authbridge-proxy` name has to match.
  The paragraph explaining that is this branch's addition.
Hai's review on #2618. Every claim below was re-checked against the
cortex tree at v0.8.1 and at main before changing the text.

Accuracy rule 2, do not document unreleased behaviour. The page now
describes v0.8.1 throughout, which is what the install one-liner
delivers:

- Revert CTX(1M) to CONTEXT(1M) and keep the 97-column money threshold.
  cortex#1246 shortens the heading and moves the threshold to 93, but it
  is in no tag. The contradictory VERIFY markers are reconciled, and a
  v0.9.0 marker records the follow-up by quoted text rather than by line
  number, which goes stale.
- Drop `agentop configure opencode`, which arrived in cortex#1243 after
  v0.8.1; on v0.8.1 it prints "coming soon" and exits 0. OpenCode joins
  Codex on `agentop exec`.
- Drop the Codex `configure` row: it only ever prints "coming soon", so
  "each one takes disable and status" was false for it.
- Replace `agentop setup` (cortex#1245, unreleased) with
  `agentop service restart`. No setup step touches the CA; the proxy
  mints one on boot when any of tls.crt, tls.key or ca.crt is missing
  (tlsbridge.EnsureFileSource), so a restart is what regenerates it.

Trust-store variables. REQUESTS_CA_BUNDLE, SSL_CERT_FILE,
CURL_CA_BUNDLE and GIT_SSL_CAINFO REPLACE the trust store rather than
adding to it, so they need ca/bundle.crt, not ca.crt. Pointed at ca.crt
a program trusts only the Cortex CA and every unbridged host fails.
Only NODE_EXTRA_CA_CERTS is additive. The proxy value gains its scheme.

The macOS note was correct for Go only. It is crypto/x509 on darwin that
ignores SSL_CERT_FILE; git, curl and Python read these variables there
too, so steering a Python user to the keychain sent them somewhere that
does nothing for them. Retitled, scoped to Go, and it now gives the
login-keychain command instead of an anchor that lands on the section
top. Same correction applied to the copy in troubleshooting.md.

Latency section, which claimed figures Cortex does not produce:

- The caps are mean +/- 1 sigma over the calls in a bucket, not the
  fastest and slowest call. Removed "Slowest call | 24 s" and the
  per-session "spread (+/-1 sigma)" row: sigma exists only per chart
  bucket, SessionSummary has no latency field, and the only window-wide
  figure is the usage footer's request-weighted LATENCY mean, with no
  sigma.
- Durations are kept for every non-tunnel response, not model calls
  alone, so fast non-model requests pull the mean down.
- A bucket with no measured call reads 0 with the legend
  "0 = no measured responses"; only an empty window says
  "no latency samples in this window".
- One-call buckets and collapsed caps both draw a bare crossbar, and the
  lower cap is clamped at zero, so a foot on the bottom row means sigma
  >= mean, not an instant reply.
- The slowest call IS recorded, on the event, in the sortable DURATION
  column. "Cortex records no maximum" sent readers away from the one
  view that answers the question; it is the usage charts that keep none.
- Issue attribution split correctly: #951 is TTFT and percentiles,
  #1026 is the maximum and p99.

Also: :::caution is not in CONTRIBUTING's callout table and Docusaurus
v3 deprecates it, so the one this PR added is now :::warning. The
backoff prose is marked macOS-only, since the systemd unit retries every
10s and gives up after 5 starts in 300s.

Signed-off-by: Mariusz Sabath <[email protected]>
Assisted-By: Claude Code
mrsabath added a commit that referenced this pull request Oct 4, 2026
Hai's review on #2618. Every claim below was re-checked against the
cortex tree at v0.8.1 and at main before changing the text.

Accuracy rule 2, do not document unreleased behaviour. The page now
describes v0.8.1 throughout, which is what the install one-liner
delivers:

- Revert CTX(1M) to CONTEXT(1M) and keep the 97-column money threshold.
  cortex#1246 shortens the heading and moves the threshold to 93, but it
  is in no tag. The contradictory VERIFY markers are reconciled, and a
  v0.9.0 marker records the follow-up by quoted text rather than by line
  number, which goes stale.
- Drop `agentop configure opencode`, which arrived in cortex#1243 after
  v0.8.1; on v0.8.1 it prints "coming soon" and exits 0. OpenCode joins
  Codex on `agentop exec`.
- Drop the Codex `configure` row: it only ever prints "coming soon", so
  "each one takes disable and status" was false for it.
- Replace `agentop setup` (cortex#1245, unreleased) with
  `agentop service restart`. No setup step touches the CA; the proxy
  mints one on boot when any of tls.crt, tls.key or ca.crt is missing
  (tlsbridge.EnsureFileSource), so a restart is what regenerates it.

Trust-store variables. REQUESTS_CA_BUNDLE, SSL_CERT_FILE,
CURL_CA_BUNDLE and GIT_SSL_CAINFO REPLACE the trust store rather than
adding to it, so they need ca/bundle.crt, not ca.crt. Pointed at ca.crt
a program trusts only the Cortex CA and every unbridged host fails.
Only NODE_EXTRA_CA_CERTS is additive. The proxy value gains its scheme.

The macOS note was correct for Go only. It is crypto/x509 on darwin that
ignores SSL_CERT_FILE; git, curl and Python read these variables there
too, so steering a Python user to the keychain sent them somewhere that
does nothing for them. Retitled, scoped to Go, and it now gives the
login-keychain command instead of an anchor that lands on the section
top. Same correction applied to the copy in troubleshooting.md.

Latency section, which claimed figures Cortex does not produce:

- The caps are mean +/- 1 sigma over the calls in a bucket, not the
  fastest and slowest call. Removed "Slowest call | 24 s" and the
  per-session "spread (+/-1 sigma)" row: sigma exists only per chart
  bucket, SessionSummary has no latency field, and the only window-wide
  figure is the usage footer's request-weighted LATENCY mean, with no
  sigma.
- Durations are kept for every non-tunnel response, not model calls
  alone, so fast non-model requests pull the mean down.
- A bucket with no measured call reads 0 with the legend
  "0 = no measured responses"; only an empty window says
  "no latency samples in this window".
- One-call buckets and collapsed caps both draw a bare crossbar, and the
  lower cap is clamped at zero, so a foot on the bottom row means sigma
  >= mean, not an instant reply.
- The slowest call IS recorded, on the event, in the sortable DURATION
  column. "Cortex records no maximum" sent readers away from the one
  view that answers the question; it is the usage charts that keep none.
- Issue attribution split correctly: #951 is TTFT and percentiles,
  #1026 is the maximum and p99.

Also: :::caution is not in CONTRIBUTING's callout table and Docusaurus
v3 deprecates it, so the one this PR added is now :::warning. The
backoff prose is marked macOS-only, since the systemd unit retries every
10s and gives up after 5 starts in 300s.

Signed-off-by: Mariusz Sabath <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@mrsabath

mrsabath commented Oct 4, 2026

Copy link
Copy Markdown
Member Author

Thanks Hai — this was a thorough review and most of it was right. Pushed the conflict resolution in e54832c and the review fixes in 4412de8. Replied on all 17 threads individually.

Conflict. Two hunks in docs/operate/troubleshooting.md, both where the abctl→cortex rename landed on main across lines this branch had edited. The second one is worth flagging because picking either side alone would have been wrong: main narrowed the ps to grep cortex, but this section is specifically about a machine carrying both generations, so dropping the pre-v0.7.0 authbridge-proxy name would have contradicted the paragraph right below it. Kept the two-name grep and merged both halves of the VERIFY marker.

The governing decision was your line-28 comment: the page straddled v0.8.1 and main. I took your first option and made it describe v0.8.1 throughout, since that is what the install one-liner delivers. That is what drove the CONTEXT(1M) revert, keeping 97, and moving configure opencode and agentop setup out — all four were unreleased-behaviour cases under accuracy rule 2.

I verified each claim against the cortex tree before changing the text, at the tag and at main. Everything load-bearing held up:

  • bundle.go states the trust-store point in its own words — ca.crt works only where the setting is additive, the other four replace the store, and SSL_CERT_FILE "serves git, curl and Python but not Go" on macOS. That made your two must-fixes on lines 117 and 123 the most consequential in the review: the old text broke unrelated TLS and sent Python users somewhere that does nothing for them.
  • colDuration exists and sorts in v0.8.1, so "Cortex records no maximum" was telling readers to stop looking for data that is there.
  • usage_render.go:507 computes latSum/latN with no σ, so the per-session "±1σ spread" row was a figure no surface can produce.
  • Both issue titles confirm the split: chore(deps-dev): Bump @vitejs/plugin-react from 5.1.4 to 6.0.1 in /kagenti/ui-v2 #951 is TTFT/percentiles, docs: Update example version tag to v0.5.1 in Ansible README #1026 is the max and p99.

Two things I did not do, both called out in-thread: the mock stays hand-edited rather than a real capture (your 7-column block is referenced in the VERIFY v0.9.0 marker for when cortex#1246 ships), and the two pre-existing :::caution blocks in troubleshooting.md are untouched since they fall outside this diff — say the word if you want them converted here.

Also corrected four claims in the PR description that overstated things the same way the page did, including the "five agents" count you flagged.

@huang195 huang195 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes again, on a smaller set. Most of round 1 landed as written, and the governing choice, v0.8.1 throughout, holds. At v0.8.1 I re-checked these, and they agree:

  • the column headings and the 97 threshold
  • the five ports and the 30 s backoff
  • the systemd unit's retry and give-up values
  • the CA-on-boot path
  • the whisker glyphs and the empty-bucket strings

Every inline comment cites cortex v0.8.1 (a6cb1d77) unless it says main (0c6e34b5).

Two must-fixes, and both started in my round-1 wording:

  • OpenCode (laptop.md:124). agentop exec -- opencode routes nothing when OpenCode's background service is already running. When it does start the service, the routing outlives the command.
  • The lower cap (reading-the-numbers.md:330). The bottom row covers a tenth of the frame, so a cap there does not mean σ ≥ mean.

Three more of my round-1 sentences need correcting:

  • bobshell does not read config.yaml (laptop.md:109).
  • The by-hand list omits HTTP_PROXY and the lowercase spellings (laptop.md:130).
  • My ps pattern still matched an agentop command line (troubleshooting.md:151).

Round-1 threads without a reply. Two troubleshooting threads have none, the ones on lines 151 and 155 then. I've re-raised the first inline, with a corrected pattern. Most of the second I withdraw. v0.7.0's abctl uses the same launchd label, io.rossoctl.cortex, and the same unit, cortex.service (v0.7.0 authbridge/cmd/abctl/cmd_service.go:30-31). So v0.8.1's agentop service stop stops a v0.7.0 job too. One small point remains. There is one label per user, so agentop service stop stops whichever job holds it, which need not be the one that holds the port. The comment "from the install that currently holds the port" (line 189) promises more than that. The sequence still converges, because the kill and the install follow.

Outside this diff, related:

  • troubleshooting.md:27-29 contradicts the section it links to (CONTRIBUTING accuracy rule 1). "For another agent, you set the certificate variable yourself." configure or exec sets it now. Lines 362-364 ("the proxy variable and the certificate variable") have the same problem: there are now five CA variables, in two files.
  • troubleshooting.md:339-353, "Another program stopped working".
    • The prose list at 345 names only HTTP_PROXY, HTTPS_PROXY and NODE_EXTRA_CA_CERTS.
    • The section does not name the most likely cause of this exact symptom: a replacing variable such as SSL_CERT_FILE or REQUESTS_CA_BUNDLE pointed at ca.crt. That is what this page's previous text advised.
    • The env | grep -iE "PROXY|CA_CERT|CA_BUNDLE|SSL_CERT" at 349 misses GIT_SSL_CAINFO, which is what breaks git, the first tool that line 341 names. Adding |SSL_CAINFO catches it (tested).
  • The PR body is stale. It still lists the CONTEXT(1M) → CTX(1M) correction and the agentop setup addition, and 4412de8 reverted both.

Author: mrsabath (MEMBER — maintainer)
Areas reviewed: Docs (checked against cortex v0.8.1 and main source, two v0.8.1 agentop runs under a scratch HOME, and CONTRIBUTING's documentation standard)
Agent/IDE config (.claude/.vscode): none
Commits: 2 commits plus 2 merges of main, both non-merge commits signed off: yes
CI status: passing

Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/get-started/laptop.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
mrsabath added a commit that referenced this pull request Oct 6, 2026
Hai's second review on #2618. Every claim below was re-checked against
the cortex tree at v0.8.1 (a6cb1d77) and at main before changing the
text.

The two must-fixes:

- OpenCode does not send its traffic from the process you run. One
  background service per user sends all of it and keeps the environment
  it started with, so `agentop exec -- opencode` routes nothing when the
  service is already running, and the routing outlives the command when
  exec is what started it. The page now says both, plus how to check
  (`opencode service status`). Codex keeps the old sentence, which is
  true of Codex alone.
- The lower cap on the bottom row of a latency whisker does not mean
  sigma >= mean. The bottom row holds every value up to a tenth of the
  frame's top, so a cap there means mean minus 1 sigma is near zero.
  Re-worded, and "one standard deviation" is spelled out where sigma
  had not been defined yet.

Three of Hai's own round-1 sentences, corrected:

- bobshell reads no config at configure time; only claude-code and bob
  read `~/.cortex/config.yaml`, and the intro now says which.
- The by-hand variable list gains HTTP_PROXY and the lowercase proxy
  names (a plain-http call or a lowercase-only tool silently bypasses
  Cortex otherwise), and $HOME in place of ~, which does not expand in
  a quoted export or a settings file.
- The ps pattern anchors on the binary followed by a flag
  (`/(cortex|authbridge-proxy) --`), which the service always passes,
  so a `tail -f` of proxy.log, a cortex.test binary or an
  `--proxy .../cortex` argument no longer match. A section that ends in
  `kill <pid>` owes that much.

Smaller corrections from the same review:

- The Claude Code row names CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;
  the Bob row says the printed command needs sudo, writes the System
  keychain, and that Bob needs a restart; the bobshell row names the rc
  files and stops calling a fragment a sentence.
- Sorting by DURATION now gives the keys (c, then s in the picker) and
  two limits: the sort covers the newest 2000 events (o loads older),
  and a chart opened from Sessions covers every session.
- "Typical call" became "average call", the planned-figures note no
  longer reads as "time-to-first-token percentiles", and the worked
  example names the source of its 11 s: the usage pane's LATENCY
  footer, scoped to the session, at most the last 6 h.
- The v0.9.0 marker for cortex#1246 now lists every place the heading
  and the 97-column threshold appear, including "Read the context
  gauge" here and the CONTEXT column mention in troubleshooting.
- No setup or install step *writes* the CA (install.sh and service
  status do read it); after a restart mints a new CA, a keychain that
  trusted the old one needs the command again; the service log is
  proxy.log (log show and journalctl never see the proxy's own lines);
  the Linux log sample no longer shows a supervisor line systemd does
  not run; `agentop service stop` stops whichever install holds the
  one label per user, so the fix sequence says HOME and abctl and why
  it still converges; the macOS supervisor notes are scoped away from
  Linux, where ps shows one cortex per running install and the lost
  unit reads failed.
- "Another program stopped working" names the most likely cause, a
  replacing variable pointed at ca.crt rather than bundle.crt, and the
  env grep gains SSL_CAINFO so GIT_SSL_CAINFO shows. The no-events
  checklist no longer tells the reader to set "the certificate
  variable" by hand for agents that configure or exec covers.
- The Go note copies laptop.md's line (LibreSSL, the bundle) instead of
  drifting from it.

Co-Authored-By: Claude Code <[email protected]>
@mrsabath

mrsabath commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Round 2 pushed in 512fa4a. Replied on all threads individually, and the PR body is rewritten to match what the branch now contains.

The two must-fixes. Both verified against the tree before writing:

  • OpenCode — docs/agents/opencode.md and opencode.go on main say exactly what you said: one background service per user sends all the traffic and keeps its starting environment. The page now has a dedicated paragraph carrying all three facts (routes nothing when the service already runs; opencode service status tells you; the routing outlives the command when exec started the service). Codex keeps the old sentence, which is true of Codex alone.
  • The lower cap — your counterexample settles it. The bottom row holds everything up to a tenth of the peak, so ┴ there says nothing about σ vs the mean. Re-worded to "mean minus one standard deviation is near zero", with σ spelled out where it had not been defined.

Your three round-1 sentences, corrected as you asked: bobshell no longer implied under a config-reading sentence; the by-hand list gained HTTP_PROXY and the lowercase names (plus agentop exec --print and $HOME); the ps pattern is your binary-followed-by-flag anchor, tested against the same sample argv lines — I could not run ps against the live machine from this sandbox, so the live check is yours if you want it.

The threads without a reply — both troubleshooting ones now have answers. The stop-block comment says HOME and abctl, and the sentence after it states what one-label-per-user means and why the sequence still converges. I also took the withdrawn round-1 label point's one remaining consequence.

Outside-the-diff items, all taken: the certificate-variable sentence and the no-events checklist point at configure/exec; "Another program stopped working" names the replacing-variable-at-ca.crt cause and its grep catches GIT_SSL_CAINFO; the Go note copies laptop.md's line and names the bundle for the Linux claim; the log commands read proxy.log and scope the supervisor prose to macOS with the systemd shape alongside; the v0.9.0 marker for cortex#1246 now enumerates every place the heading and the 97-column threshold appear, on both pages.

One deliberate limit, same as last round: the sessions mock stays as v0.8.1 renders it, hand-set. A real capture needs a v0.8.1 binary against a live proxy, which this sandbox does not run — the marker quotes your 7-column block for whoever lands the switch.

另起炉灶 would be wrong for this round — it was 对症下药 (treating the right symptom with the right medicine) throughout, and where my round-1 text caused the defect you said so yourself, which made it easy to take.

🤖 Generated with Claude Code

Hai's second review on #2618. Every claim below was re-checked against
the cortex tree at v0.8.1 (a6cb1d77) and at main before changing the
text.

The two must-fixes:

- OpenCode does not send its traffic from the process you run. One
  background service per user sends all of it and keeps the environment
  it started with, so `agentop exec -- opencode` routes nothing when the
  service is already running, and the routing outlives the command when
  exec is what started it. The page now says both, plus how to check
  (`opencode service status`). Codex keeps the old sentence, which is
  true of Codex alone.
- The lower cap on the bottom row of a latency whisker does not mean
  sigma >= mean. The bottom row holds every value up to a tenth of the
  frame's top, so a cap there means mean minus 1 sigma is near zero.
  Re-worded, and "one standard deviation" is spelled out where sigma
  had not been defined yet.

Three of Hai's own round-1 sentences, corrected:

- bobshell reads no config at configure time; only claude-code and bob
  read `~/.cortex/config.yaml`, and the intro now says which.
- The by-hand variable list gains HTTP_PROXY and the lowercase proxy
  names (a plain-http call or a lowercase-only tool silently bypasses
  Cortex otherwise), and $HOME in place of ~, which does not expand in
  a quoted export or a settings file.
- The ps pattern anchors on the binary followed by a flag
  (`/(cortex|authbridge-proxy) --`), which the service always passes,
  so a `tail -f` of proxy.log, a cortex.test binary or an
  `--proxy .../cortex` argument no longer match. A section that ends in
  `kill <pid>` owes that much.

Smaller corrections from the same review:

- The Claude Code row names CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;
  the Bob row says the printed command needs sudo, writes the System
  keychain, and that Bob needs a restart; the bobshell row names the rc
  files and stops calling a fragment a sentence.
- Sorting by DURATION now gives the keys (c, then s in the picker) and
  two limits: the sort covers the newest 2000 events (o loads older),
  and a chart opened from Sessions covers every session.
- "Typical call" became "average call", the planned-figures note no
  longer reads as "time-to-first-token percentiles", and the worked
  example names the source of its 11 s: the usage pane's LATENCY
  footer, scoped to the session, at most the last 6 h.
- The v0.9.0 marker for cortex#1246 now lists every place the heading
  and the 97-column threshold appear, including "Read the context
  gauge" here and the CONTEXT column mention in troubleshooting.
- No setup or install step *writes* the CA (install.sh and service
  status do read it); after a restart mints a new CA, a keychain that
  trusted the old one needs the command again; the service log is
  proxy.log (log show and journalctl never see the proxy's own lines);
  the Linux log sample no longer shows a supervisor line systemd does
  not run; `agentop service stop` stops whichever install holds the
  one label per user, so the fix sequence says HOME and abctl and why
  it still converges; the macOS supervisor notes are scoped away from
  Linux, where ps shows one cortex per running install and the lost
  unit reads failed.
- "Another program stopped working" names the most likely cause, a
  replacing variable pointed at ca.crt rather than bundle.crt, and the
  env grep gains SSL_CAINFO so GIT_SSL_CAINFO shows. The no-events
  checklist no longer tells the reader to set "the certificate
  variable" by hand for agents that configure or exec covers.
- The Go note copies laptop.md's line (LibreSSL, the bundle) instead of
  drifting from it.

Assisted-By: Claude Code
Signed-off-by: Mariusz Sabath <[email protected]>
mrsabath added a commit that referenced this pull request Oct 6, 2026
Hai's second review on #2618. Every claim below was re-checked against
the cortex tree at v0.8.1 (a6cb1d77) and at main before changing the
text.

The two must-fixes:

- OpenCode does not send its traffic from the process you run. One
  background service per user sends all of it and keeps the environment
  it started with, so `agentop exec -- opencode` routes nothing when the
  service is already running, and the routing outlives the command when
  exec is what started it. The page now says both, plus how to check
  (`opencode service status`). Codex keeps the old sentence, which is
  true of Codex alone.
- The lower cap on the bottom row of a latency whisker does not mean
  sigma >= mean. The bottom row holds every value up to a tenth of the
  frame's top, so a cap there means mean minus 1 sigma is near zero.
  Re-worded, and "one standard deviation" is spelled out where sigma
  had not been defined yet.

Three of Hai's own round-1 sentences, corrected:

- bobshell reads no config at configure time; only claude-code and bob
  read `~/.cortex/config.yaml`, and the intro now says which.
- The by-hand variable list gains HTTP_PROXY and the lowercase proxy
  names (a plain-http call or a lowercase-only tool silently bypasses
  Cortex otherwise), and $HOME in place of ~, which does not expand in
  a quoted export or a settings file.
- The ps pattern anchors on the binary followed by a flag
  (`/(cortex|authbridge-proxy) --`), which the service always passes,
  so a `tail -f` of proxy.log, a cortex.test binary or an
  `--proxy .../cortex` argument no longer match. A section that ends in
  `kill <pid>` owes that much.

Smaller corrections from the same review:

- The Claude Code row names CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;
  the Bob row says the printed command needs sudo, writes the System
  keychain, and that Bob needs a restart; the bobshell row names the rc
  files and stops calling a fragment a sentence.
- Sorting by DURATION now gives the keys (c, then s in the picker) and
  two limits: the sort covers the newest 2000 events (o loads older),
  and a chart opened from Sessions covers every session.
- "Typical call" became "average call", the planned-figures note no
  longer reads as "time-to-first-token percentiles", and the worked
  example names the source of its 11 s: the usage pane's LATENCY
  footer, scoped to the session, at most the last 6 h.
- The v0.9.0 marker for cortex#1246 now lists every place the heading
  and the 97-column threshold appear, including "Read the context
  gauge" here and the CONTEXT column mention in troubleshooting.
- No setup or install step *writes* the CA (install.sh and service
  status do read it); after a restart mints a new CA, a keychain that
  trusted the old one needs the command again; the service log is
  proxy.log (log show and journalctl never see the proxy's own lines);
  the Linux log sample no longer shows a supervisor line systemd does
  not run; `agentop service stop` stops whichever install holds the
  one label per user, so the fix sequence says HOME and abctl and why
  it still converges; the macOS supervisor notes are scoped away from
  Linux, where ps shows one cortex per running install and the lost
  unit reads failed.
- "Another program stopped working" names the most likely cause, a
  replacing variable pointed at ca.crt rather than bundle.crt, and the
  env grep gains SSL_CAINFO so GIT_SSL_CAINFO shows. The no-events
  checklist no longer tells the reader to set "the certificate
  variable" by hand for agents that configure or exec covers.
- The Go note copies laptop.md's line (LibreSSL, the bundle) instead of
  drifting from it.

Co-Authored-By: Claude Code <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
@mrsabath

mrsabath commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

The thread replies above cite 512fa4ab; that commit failed the DCO check for a missing Signed-off-by, so it was amended and force-pushed as 0ca39150 — same content, same tree (git diff 512fa4ab 0ca39150 is empty). Cite 0ca39150 as the round-2 commit.

@mrsabath

mrsabath commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Housekeeping on the commit references in my replies above, and a force-push notice.

The branch was force-pushed, content unchanged. I rewrote the commit messages to replace two Co-Authored-By trailers with Assisted-By: Claude Code, per this repo's convention. The trees are byte-identical — git diff 0ca39150 43ec00a0 is empty — and the merge topology and DCO sign-offs are unchanged. Only the messages and therefore the SHAs moved.

My round-2 replies cite 512fa4ab, which is not reachable from this PR. That was a pre-rebase SHA; the round-2 work actually landed as 0ca39150, and after the rewrite above it is now 43ec00a0. The mapping, if you want to follow a specific reply:

Round Reply cites Now on the branch
1 4412de85 efe8f08e
2 512fa4ab 43ec00a0

Sorry for the misdirection — nothing in the text I described changed, only where to find it. The current diff is the thing to review.

@huang195 huang195 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 3. Cześć Mariusz! This round is nearly a victory lap. Both must-fixes are fixed, and every round-2 thread but one landed as proposed. I re-checked the new text against cortex v0.8.1 (a6cb1d77), and these agree: the Bob Shell rc files, agentop exec --print, the request-weighted LATENCY footer, the picker's s, and (on main) opencode service status.

Approving. Three suggestions and two nits remain, inline, and two of the three suggestions are my own round-2 wording coming back to haunt me. They are worth one more small commit before merge:

  • IBM Bob and the certificate (troubleshooting.md:28). configure bob sets no CA variable, and this is the TLS-error section.
  • The lower cap's lead clause (reading-the-numbers.md:330). It still says that every bottom-row cap is a clamp.
  • The stray supervisor on Linux (troubleshooting.md:188). The reply says this changed, but the text has not.

Housekeeping:

  • The force-push. 43ec00a has the same three files as 0ca3915 (an empty git diff). It only swaps Co-Authored-By for Assisted-By, as CLAUDE.md asks, so "cite 0ca3915" now means 43ec00a.
  • Your HOME is showing. Two thread replies print your sandbox's home path where $HOME was meant: the shell expanded it before posting. The pages have a literal $HOME, so only the replies are affected. Edit them if you'd rather not publish the path.
  • A Polish author closing with 对症下药, reviewed in English: dobra robota on the internationalisation. 😄

Author: mrsabath (MEMBER — maintainer)
Areas reviewed: Docs (the round-3 delta 4412de8..43ec00a, checked against cortex v0.8.1 and main source)
Agent/IDE config (.claude/.vscode): none
Commits: 3 commits plus 3 merges of main; all 3 non-merge commits signed off: yes
CI status: passing

Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/get-started/reading-the-numbers.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/operate/troubleshooting.md Resolved
Comment thread docs/get-started/laptop.md Resolved
@mrsabath
mrsabath merged commit 44ec913 into main Oct 7, 2026
26 checks passed
mrsabath added a commit that referenced this pull request Oct 7, 2026
Hai's third review on #2618, which approved the PR. Five comments, all his
own earlier wording coming back; each claim re-checked against the cortex
tree before changing the text.

- Bob does not get its CA from agentop. `configure bob enable` writes one
  key, http.proxy, and no CA variable: cmd_bob.go says the keychain is "an
  OS trust-store change agentop does not make for you", so enable prints
  the sudo command rather than running it. The TLS-error section said
  "configure or exec sets the certificate variable", which sends a Bob user
  looking for the cause elsewhere. That section and the no-events checklist
  now scope the claim to exec and give Bob its own sentence.

- The whisker floor. "A lower cap on the bottom row is clamped at zero" is
  still wrong: rowOf puts a value at int(v/peak*plotRows + 0.999), so row 1
  holds everything up to a tenth of the peak, while the clamp at
  usage_whiskers.go:47-49 fires only when mean minus sigma is negative. A
  bucket with mean 3.0s and sigma 2.5s under an 8s peak lands on row 1 with
  nothing clamped. Reworded to the bottom tenth of the chart, which is also
  honest about being relative to the peak.

- "Stop every stray supervisor by PID" is macOS-only. There is no
  supervisor on Linux, and the install that lost has already stopped, so a
  Linux reader hunts the ps output for something that is not there. Now
  "any stray proxy", with the supervisor as a macOS aside.

- "Another program stopped working" named two of the four replacing
  variables while naming git and curl, whose variables are the two it left
  out: CURL_CA_BUNDLE and GIT_SSL_CAINFO are now listed. Dropped "that
  sends other programs through Cortex", which fits a proxy variable and not
  the trust-store cause that follows, and dropped ssh, which reads none of
  these variables.

- The Bob Shell row said it runs "Bob" through agentop exec, in a row whose
  last sentence separates it from IBM Bob.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
@mrsabath

mrsabath commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Correction on where the round-3 fixes live, @huang195.

My five replies above cite 68425b0c, which is not on main. This PR merged at 01:30 UTC and I pushed that commit at 01:37 — seven minutes later, to a branch whose PR was already closed. The ref moved, no push event fired, and the commit went nowhere. So the five round-3 fixes were never in what landed here.

They are now in #2626, cherry-picked onto current main, unchanged from what the threads above agreed. CI is green.

What merged in this PR is rounds 1 and 2. Sorry for the misdirection — the threads above are accurate about what changed, just not about where to find it.

mrsabath added a commit that referenced this pull request Oct 9, 2026
…#2626)

Hai's third review on #2618, which approved the PR. Five comments, all his
own earlier wording coming back; each claim re-checked against the cortex
tree before changing the text.

- Bob does not get its CA from agentop. `configure bob enable` writes one
  key, http.proxy, and no CA variable: cmd_bob.go says the keychain is "an
  OS trust-store change agentop does not make for you", so enable prints
  the sudo command rather than running it. The TLS-error section said
  "configure or exec sets the certificate variable", which sends a Bob user
  looking for the cause elsewhere. That section and the no-events checklist
  now scope the claim to exec and give Bob its own sentence.

- The whisker floor. "A lower cap on the bottom row is clamped at zero" is
  still wrong: rowOf puts a value at int(v/peak*plotRows + 0.999), so row 1
  holds everything up to a tenth of the peak, while the clamp at
  usage_whiskers.go:47-49 fires only when mean minus sigma is negative. A
  bucket with mean 3.0s and sigma 2.5s under an 8s peak lands on row 1 with
  nothing clamped. Reworded to the bottom tenth of the chart, which is also
  honest about being relative to the peak.

- "Stop every stray supervisor by PID" is macOS-only. There is no
  supervisor on Linux, and the install that lost has already stopped, so a
  Linux reader hunts the ps output for something that is not there. Now
  "any stray proxy", with the supervisor as a macOS aside.

- "Another program stopped working" named two of the four replacing
  variables while naming git and curl, whose variables are the two it left
  out: CURL_CA_BUNDLE and GIT_SSL_CAINFO are now listed. Dropped "that
  sends other programs through Cortex", which fits a proxy variable and not
  the trust-store cause that follows, and dropped ssh, which reads none of
  these variables.

- The Bob Shell row said it runs "Bob" through agentop exec, in a row whose
  last sentence separates it from IBM Bob.

Assisted-By: Claude (Anthropic AI) <[email protected]>

Signed-off-by: Mariusz Sabath <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants