# Tag a bug. *Get a tested draft PR.*

ByteAsk Cloud Agent reproduces, fixes and re-checks C and C++ bugs in a sealed sandbox, so your engineers don’t drop what they’re doing.

[Request pilot access](https://byteask.ai/contact?intent=cloud-agent-pilot#talk) [or book a demo](https://byteask.cal.com/pratyush/book-a-demo)

Runs in ByteAsk’s cloud, one sealed sandbox per task: no credentials inside, no open internet. [Trust Center](https://trust.byteask.ai)

Private pilot: today our team starts each task for you. Slack is rolling out; Jira is next.

**Thread**# feed-handler

**Engineer**

@ByteAsk the feed handler crashes on short packets. Can you take it?

**ByteAsk***APP*

Fixed, and re-checked on a clean copy. Draft PR ready for your review.

Feed handler reads past the end of a short packet All checks passed

#### Feed handler reads past the end of a short packet #6

Draft **byteask***bot* wants to merge 1 commit into `main`

Conversation Commits Checks Files changed

**byteask***bot*

**Root cause.** A 1-byte packet was decoded as 30 bytes.

**Fix.** Check `msg_len` before decoding; short packets are counted, not decoded. Regression test added.

- Crash reproduced with ASan
- Fixed code: sanitizer clean
- Re-checked on a clean copy, without the agent

Based on a real ByteAsk run on our own C++ feed handler, simplified.

## Cloud agents, *at work.*

One sealed sandbox per task.

Cloud agent

Replay mismatch

Cloud agent

@ByteAsk Crash on short packets

Slack

read_order reads 30 bytes **ASan: crash reproduced****Short packet rejected, counted**

1-byte packet OrderMsg · 30 bytes

Guard `h.msg_len < sizeof(wire::OrderMsg)`

**Context**code graph of your build Rolling out

who calls read_order?

on_packet → read_order handler.hpp:68

sizeof(OrderMsg)?

30 bytes

**Harness**in the sandbox

1. Build
2. Replay
3. ASan + UBSan
4. Analysis

**Clean re-run**Same patch, clean copy, without the agent

**Draft PR**All checks passed

Cloud agent

Book race

gVisor · No credentials · No open internet · [Trust Center](https://trust.byteask.ai)

Three cloud agents, one sealed sandbox per task; the middle one fixes a crash on short packets. Illustrated workflow · timing compressed.

## Read the patch. *Your CI already ran.*

Our harness checked it in the sandbox. Then your own CI ran on the draft.

`include/tbt/handler.hpp`

```
 switch (static_cast<char>(pkt.body[0])) {
-    case wire::kCancelOrder: on_order(read_order(pkt.body)); break;
+    case wire::kCancelOrder:
+        if (h.msg_len < sizeof(wire::OrderMsg)) { ++stats_.short_msg; break; }
+        on_order(read_order(pkt.body));
+        break;
```

**All checks have passed**Your repository’s own CI, on the draft

- Build / Production *Successful*
- Build / Simulator *Successful*
- Behavior / Production replay *Successful*
- Safety / ASan + UBSan *Successful*
- Analysis / Production + simulator *Successful*

This pull request is still a draft **Ready for review**

## Run it on one of *your own bugs.*

[Request pilot access](https://byteask.ai/contact?intent=cloud-agent-pilot#talk) [or book a demo](https://byteask.cal.com/pratyush/book-a-demo)

Bring one of your bugs. We set up your build with you and start the task.

---
HTML version: https://byteask.ai/cloud-agent
