Files
lumbridge-code/spikes
Metal AgentandClaude Opus 5 219c674aea Read Claude Code's own quota endpoint, not just its status line
Decision 0015 rejected the account usage endpoint because AGENTS.md forbade
reading a harness's credential. The rule was written to stop one program
helping itself to another's secrets, and it was catching a legitimate use with
it: the user asking about their own subscription, through software they
installed to do that. AGENTS.md now states the narrow allowance instead of an
absolute the project does not hold, and 0016 records it.

The status line stays. It is free and it speaks every turn. What it cannot do
is report the per-model weekly limits a Max plan meters separately, or answer
at all before a session has taken a turn. The first live reading found the
account-wide seven-day window at 38% left and a per-model weekly window at 77%
left — a second ceiling the footer previously could not see.

Constraints the credential is read under, all enforced in code: access token
only, never the refresh token; zeroed on drop, along with the file buffer it
was borrowed out of; unprintable by construction, since HarnessError carries no
owned strings and AccessToken's Debug is hand-written; identified as
lumbridge/<version>, because sending claude-code/2.1.0 would make our traffic
indistinguishable from the harness's in Anthropic's logs; and off entirely
under LUMBRIDGE_CLAUDE_OAUTH=0.

The request runs on a detached thread with a slow refresh and a 429 backoff, so
a ten-second round trip cannot stall the transcript follower or make quitting
wait on the network, and one surface failing does not fault the other two.

Footer polish on top: the harness name prints once per group instead of in
front of each of its four windows, each quota carries a short scope pill
(5h, 7d, Fable wk, tokens) where an invisible BORDER-weight label used to be,
quotas sort ahead of spend, and a window under ten percent turns its headline
amber — value colour on the number, provenance colour on the meter, never
mixed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 22:04:34 -07:00
..

Native UI spikes

These disposable applications render the same fixture through GPUI and Floem. They are a decision instrument, not product code. The root workspace excludes this nested workspace so normal Lumbridge CI does not download or compile both UI frameworks.

The GPUI spike uses published gpui 0.2.2. The Floem spike pins upstream commit 778bb5f2aa08429e579ee2e6ac97e84fbf18b618; the crates.io floem 0.2.0 package lags the current API substantially enough that comparing it to current GPUI would not be representative.

Both spikes must preserve the same information architecture:

  • workspace/sidebar and remote host state;
  • two rows of three busy surfaces;
  • local and remote terminal/agent panes;
  • native Markdown editor/preview and browser placeholders;
  • connection, harness, usage, and burn context in the footer.

GPUI also has an integration mode with one real local PTY owned by lumbridge-runtime; the other five surfaces remain deterministic. Floem and the shared model retain the all-deterministic mode for like-for-like framework comparison. GPUI feeds raw output through lumbridge-terminal and sends encoded keyboard input and terminal protocol replies through the bounded runtime actor. Its visual adapter coalesces VT cells into native styled runs, paints cursor shapes, and resizes the engine and PTY from the middle 60% of a responsive one/three/five-panel workspace. Every panel owns separate context and decision regions. Retained-history navigation is wired; text selection and mouse input remain intentionally unfinished.

Build independently:

cargo build --release --manifest-path spikes/gpui-shell/Cargo.toml
cargo build --release --manifest-path spikes/floem-shell/Cargo.toml

Each candidate is an independent Cargo workspace. GPUI pins taffy 0.9.0 while current Floem requires taffy 0.9.2; putting them in one comparison workspace creates an artificial resolver conflict and would let one candidate's dependency decisions distort the other candidate's build.

The comparison records release build time, binary size, startup, idle RSS, six-pane streaming frame time, key-to-present latency, accessibility/IME, window behavior, browser-child integration, packaging, dependency count, and license closure on macOS, Ubuntu, and Omarchy. A build is not adoption: GPUI's complete dependency-license closure remains a hard gate.