[BUG] Proxy byte counters remain zero after routed session traffic
What I was trying to do
I was validating an explicit proxy-backed agent session and using Steel's final traffic counters for operational accounting after the session was released.
Versions tested
- Steel API 0.5.2 runtime; current
maininspected for counter/close ordering - Chromium 150.0.7871.124
- Node 22.13.0
- Docker on Debian 12, host macOS arm64
Describe the bug
A session configured with proxyUrl routes document, subresource, favicon, and browser background requests through the proxy, but Steel reports proxyTxBytes: 0 and proxyRxBytes: 0.
To reproduce
- Start a loopback HTTP proxy that records byte totals.
- Create a Steel session with
proxyUrlpointing at that proxy. - Navigate to a local fixture with HTML, CSS, JavaScript, and an image.
- Confirm the proxy saw the document and subresources.
- Release the session and inspect the returned/live session details.
Actual behavior
The proxy log proves routed traffic, but Steel returns:
{
"proxyTxBytes": 0,
"proxyRxBytes": 0
}Expected behavior
The final session record should include the proxy's transmitted and received byte totals after all proxy streams have closed.
Screenshots
Not applicable. The reduced API response and proxy request count are sufficient.
Desktop
- OS: Docker on Debian 12, host macOS arm64
- Browser: Chromium 150.0.7871.124
- Steel API: 0.5.2; current
mainreads counters before closing the proxy - Node: 22.13.0
Smartphone
N/A
Additional context
The current release path reads txBytes and rxBytes before the proxy is closed. Moving the snapshot after await proxyServer.close(true) produced non-zero final totals locally and passed the session-service regression.
Source: steel-dev/steel-browser