
Workspace for Claude Code and Codex
Every command, file, and diff stays in view, so you understand the code your agents write.
Built and polished since 2024 by Kiryl Kazlovich, who works in it every day.
Find the rounding calls
Each line is rounded before tax, and the rounded lines are added up. I’ll round once, on the total.
Run the checkout tests
The total is now rounded once. All 14 checkout tests pass.
Opus 5.5 · High reasoning
Check the rounding change in cart-total.ts…
The cart total is correct now. taxTotal still rounds each line.
One gap: tax-total.ts still rounds each line…
I sent the gap to the fix session.

Each line is rounded before the sum. I will round once, after tax.
The total is rounded once. All 14 checkout tests pass.
Check the rounding change in cart-total.ts…
One gap: tax-total.ts still rounds each line…
taxTotal rounds each line, as the cart did. I will round once, on the total.
The tax is rounded once, on the total. All 19 tests pass.
The tax path is fixed. Check tax-total.ts again…
Both agents in one workspace
Select Claude Code or Codex when you start a session. Both agents can work on the same project at the same time. One sidebar lists all sessions.
I’ll trace how the cart total is rounded.
Find the rounding calls
Each line is rounded before tax, and the rounded lines are added up. I’ll round once, on the total.
Run the checkout tests
The total is now rounded once. All 14 checkout tests pass.
Opus 5.5 · High reasoning
Each step of a run on one timeline
Each search, file, command, and change shows as a row while the agent works. When you send a message during a turn, the agent reads it after the current step. You can also queue it for the next turn.
refundTotal rounds each line, like the cart did. I’ll look at the receipt from the report first.
Run the refund tests
Run the refund tests
Refunds now use half-even rounding, the same as invoices.
What changed
refundTotalrounds once, on the sum of the lines.roundHalfEvenis the one helper for cart, refunds, and invoices.
Run all checkout tests
refundTotal rounds each line, like the cart did. I’ll look at the receipt from the report first.
Run the refund tests
Run the refund tests
Refunds now use half-even rounding, the same as invoices.
What changed
refundTotalrounds once, on the sum of the lines.roundHalfEvenis the one helper for cart, refunds, and invoices.
Run all checkout tests
Open any row of the timeline
Click a row to open it beside the chat. Code has syntax colors. Markdown and HTML show as rendered pages, images open in a viewer, and a diff shows the old and the new lines.
Run the checkout tests
Run the checkout tests
The summary page is docs/checkout-totals.html. The rule follows docs.taxlib.dev/rounding.
Rounding
Totals are rounded once, after tax. Use round() from the money module, never toFixed.
Half-even, to the cent
docs/checkout-totals.html
How checkout totals are calculated
Round once, on the total.
Some carts were off by a cent. Each line was rounded before tax, so small errors added up.
https://docs.taxlib.dev/rounding
Rounding rules
Round a monetary amount one time, at the end of the calculation. Rounding in the middle moves the result.
Invoices use half-even rounding. An amount that ends in exactly half a cent goes to the nearest even cent.
See Half-even rounding for the full table.
src/checkout/cart-total.ts
- Command outputCommand output
- CodeCode
- MarkdownMarkdown
- HTMLHTML
- Web pageWeb page
- DiffDiff
- ImageImage
- CSV
- Audio
- Video
- FolderFolder
See every subagent
When an agent starts subagents or a workflow, the Agents list shows all of them. A workflow shows its phases and the model, tokens, and time of each agent. Open an agent to read its full thread beside the chat.
Review the cart totals in src/checkout/cart-total.ts. Report each defect with its line.
Review the tax path in src/checkout/tax-total.ts. Report each defect with its line.
Find the checkout paths that have no test. List each path.
Review the rounding fix in src/checkout, verify each finding, and run the tests
Review the rounding fix in src/checkout, verify each finding, and run the tests
Three subagents reviewed the fix. Hopper found that taxTotal() still rounds each line. Turing found that no test has tax on more than one line.
GPT 6 Astra · High reasoning
The review workflow is complete. Four agents ran in three phases. One finding holds: taxTotal() still rounds each line. An order with three lines can be off by one cent.
Review the tax path of the rounding fix in src/checkout. Report each finding with its line
Completed·Opus 5.5·high·118k tokens·9 tools·4 min·2 min ago
Run the tax tests
The review of the tax path is complete. It has one finding, and a new test fails on it.
What I found
Line rounding: src/checkout/tax-total.ts rounds each line in taxTotal(), then adds the lines. The cart rounds one time, after the sum.
Failing case: three lines of 0.336 give 1.02. The correct tax is 1.01.
Checks run
pnpm vitest run tax-total: 6 passed, 1 failed (the new case).
pnpm tsc --noEmit: passed.
Sessions send messages to each other
One session can send a message to another session. For example, a Claude Code session asks a Codex session to check its change. The answer arrives in the thread of the Claude Code session.
Claude CodeFix checkout rounding
Both totals now use half-even rounding. I’ll ask the review session to check the change.
Both totals now use half-even rounding. I’ll ask the review session to check the change.
CodexReview rounding fix
GPT 6 Astra · High reasoning
GPT 6 Astra · High reasoning
Use all your subscriptions
Add each of your Claude and ChatGPT accounts. See the remaining limit of each account and how fast you use it. When an account reaches its limit, select another account with one click.
How the agents write their replies. Claude uses a change from your next message. Codex uses a change in new sessions. An older Codex session can change after Codex compacts its context.
How fast the weekly limit fills, from readings this desktop keeps.
- Peak day
- 286M
- Current streak
- 5 days
- Longest streak
- 12 days
- All time
- 21.4B
Each subscription is a ChatGPT account with its own limits. Sessions use the one in use.
How the agents write their replies. Claude uses a change from your next message. Codex uses a change in new sessions. An older Codex session can change after Codex compacts its context.
How fast the weekly limit fills, from readings this desktop keeps.
Every account reads the same Claude sessions. New turns run on the one in use.
Control your sessions from your phone
The iPhone and Android apps show the sessions that run on your desktop. You read the timeline and send messages from the phone.
- 13:00
Each line is rounded before the sum. I will round once, after tax.
cart-total.ts+9-4src/checkout/Run the checkout tests$pnpm test checkoutThe total is rounded once. All 14 checkout tests pass.
This sessionReview rounding fixSentCheck the rounding change in cart-total.ts…
Review rounding fixThis sessionOne gap: tax-total.ts still rounds each line…
Fix the tax path the same way.Read tax-total.tssrc/checkout/taxTotal rounds each line, as the cart did. I will round once, on the total.
tax-total.ts+12-5src/checkout/Run the tax tests$pnpm test taxThe tax is rounded once, on the total. All 19 tests pass.
This sessionReview rounding fixSentThe tax path is fixed. Check tax-total.ts again…
0:380:510:500:490:480:470:460:450:440:430:420:410:400:390:38Session timeline
Read each command, file change, and message of the running session. Tap a row to open it.
- 13:00
Each line is rounded before the sum. I will round once, after tax.
cart-total.ts+9-4src/checkout/Run the checkout tests$pnpm test checkoutThe total is rounded once. All 14 checkout tests pass.
This sessionReview rounding fixSentCheck the rounding change in cart-total.ts…
Review rounding fixThis sessionOne gap: tax-total.ts still rounds each line…
Fix the tax path the same way.Read tax-total.tssrc/checkout/taxTotal rounds each line, as the cart did. I will round once, on the total.
tax-total.ts+12-5src/checkout/Run the tax tests$pnpm test taxThe tax is rounded once, on the total. All 19 tests pass.
This sessionReview rounding fixSentThe tax path is fixed. Check tax-total.ts again…
0:52Loading sessionsMacBook ProMac StudioOffice PCTax label copyshop-web · 3dCoupon stacking ordershop-api · 1dTax rate lookupshop-api · 1dCart badge flickershop-web · 6mRefund path testsshop-api · 4hReview rounding fixshop-api · 2mNew SessionCreate in current projectFix checkout roundingshop-api · nowDictateEditSub-agentsQueueReviewProjectDirectoriesWorkspaceChangesSettingsSession switcher
Tap the menu button. Then select a desktop and a session, or start a new session.
- 13:00Message agentDone
Use half-even rounding for tax too.
0:000:070:060:050:040:030:020:010:00Edit transcriptTranscribingDecoding your audio…Opus 5.5HighDictation
Speak your message. Check the text of the recording, then send it.
- 13:00Chat SettingsDoneModelsReasoningFable 5.1Opus 5.5Sonnet 5Haiku 4.5LowMediumHighExtra HighMaxDefaultAccessPlan modeClaude reads and plans. It asks before itchanges files or runs commands.Accept editsClaude edits files without asking. It asksbefore it runs commands.Auto modeClaude’s safety check approves routineactions. Risky actions still ask.Bypass permissionsClaude runs every tool without asking.ModelsReasoningAstra 6Sol 5.6Terra 5.6Luna 5.6LowMediumHighExtra HighMaxUltraSpeedStandardStandard speed and credit usage.FastAbout 1.5x faster; uses more credits.AccessRead onlyInspect and explain without editing files.Full autoRun automatically within the project;broader access still requires approval.
Chat Settings
Select the model and the reasoning level in one grid. Then select the access level of the agent.
- 13:00Loading changes...fix/checkout-rounding161Lines133Added28Deleted10Files0Staged10Unstaged2Newsrccheckoutrefund-total.ts+12−5rounding.ts+18−7totals.ts+4−9ordersorder-summary.ts+3−3shared/moneyhalf-even.ts+22testscheckoutrefund-total.test.ts+31rounding.test.ts+24−2fixturesrefunds.json+16−1CHANGELOG.md+2package.json+1−1ProjectDirectoriesWorkspaceChangesSettingsrefund-total.tssrc/checkout1@@ -1,4 +1,5 @@2import type { LineItem } from './totals';3−import { roundLine } from './rounding';4+import { orderTotal } from './rounding';5+import type { Refund } from '../orders/order-summary';67/** What a customer gets back for returned items. */8@@ -9,7 +10,13 @@ export function refundFor(9 items: LineItem[],10 returned: Set<string>,11−): number {12− return items13− .filter((item) => returned.has(item.sku))14− .reduce((sum, item) => sum + roundLine(item), 0);15+): Refund {16+ const back = items.filter((item) =>17+ returned.has(item.sku),18+ );19+ // Round once, on the total, as the order does.20+ const amount = orderTotal(back);21+ return {22+ amount,23+ lines: back.length,24+ };25}Donerounding.tssrc/checkout1@@ -1,8 +1,8 @@2import type { LineItem } from './totals';3+import { halfEven } from '../shared/money/half-even';45−const CENTS = 100;6−7−export function roundLine(amount: number): number {8− return Math.round(amount * CENTS) / CENTS;9+/** Amounts stay in minor units until the last step. */10+export function toMinor(amount: number): number {11+ return amount * 100;12}1314@@ -12,8 +12,19 @@ export function lineTotal(item: LineItem)15 const net = item.unitPrice * item.quantity;16− return roundLine(net * (1 + item.taxRate));17+ return net * (1 + item.taxRate);18}1920−export function orderTotal(items: LineItem[]): number {21− return items.reduce((sum, item) => sum + lineTotal(item), 0);22+/**23+ * Rounds once, on the total. Rounding each line24+ * first lost up to one cent per order.25+ */26+export function orderTotal(items: LineItem[]): number {27+ let sum = 0;28+ for (const item of items) {29+ sum += lineTotal(item);30+ }31+ return halfEven(toMinor(sum)) / 100;32}3334+export function refundTotal(items: LineItem[]): number {35+ return -orderTotal(items);36+}1 / 102 / 10
Changes tab
See the changed files of the project with their line counts. Tap a file to read its diff.
- 13:00ClaudeAnthropic · Max planwork@acme.devme@hey.comLimits5h3% left96% leftResets 11:40 AMResets 2:25 PMWeekly64% left58% leftResets Oct 7 at 2:00 PMResets Oct 6 at 8:30 AMWeekly · Fable82% left100% leftResets Oct 7 at 2:00 PMResets Oct 6 at 8:30 AMUsage over timeWeekly limit used36% now42% now100%50%0%ThuFri
The desktop keeps a reading each time it checks
the limits.Accountswork@acme.devThis computer, shared with other Claudeapps5h 3% · Weekly 64%Maxme@hey.comAdded in HB Code5h 96% · Weekly 58%MaxAdd Claude accounts on the desktop.
ClaudeLimits and accounts
See how much of each limit is left. Tap another account to use it for the next turns.
- 13:001:031:121:111:101:091:081:071:061:051:041:03Fix checkout roundingThis session
Check the rounding change in cart-total.ts…
Read cart-total.tssrc/checkout/$rg "Math.round" src/checkoutThe cart total is correct now. taxTotal still rounds each line.
CheckResultCart totalCorrectTax totalRounds each lineThis sessionFix checkout roundingSentOne gap: tax-total.ts still rounds each line…
I sent the gap to the fix session.
Task complete·1 min 12 sGPT 6 Astra · High reasoningTimeline on Android
The Android app shows the same rows. A Codex turn ends with its model and the Task complete mark.
- 13:00shop-webSessionsCart badge flicker12:54 PMTax label copyOct 6Cart drawer focus trapOct 6Product image lazy loadOct 5Search filter chipsOct 3Wishlist syncOct 2Price format in cartSep 30Checkout button stateSep 29ProjectDirectoriesWorkspaceChangesSettings
Project tab on Android
See all sessions of a project. Tap a session to open it.
- 13:00rounding.mddocs/checkoutDone
Checkout rounding
The cart and the tax round one time, on the total. The rule is in cart-total.ts.
Example order
LineAmountSubtotal$44.50Coupon VIP10-$4.45Tax$3.30Total$43.35Rule
- 1.Add the lines and the coupon.
- 2.Add the tax.
- 3.Round the result one time, to the cent.
1 of 4File preview on Android
Open a project file from the Directories tab. A Markdown file shows as formatted text.
Tools that HB Code adds to both agents
Each Claude Code session and each Codex session gets these tools. Write what you want, and the agent selects the tool.
- Create explainer videoThe cart rounding fixRendering frames: 630 / 1260Writing scenesCreating narrationRendering frames: 630 / 1260Checking framesRevision 1
The cart rounding fix
Rendering frames: 630 / 1260Writing scenesCreating narrationRendering frames: 630 / 1260Checking framesChecking frames
- Agent
- Claude
- Revision
- 1
- Scenes
- 4
- Video length
- 42.0 seconds
video-cart-rounding-fix.mp4ReviewThe total is rounded once, after tax
SubtotalTaxRound onceTotal00:18 / 00:421xExplainer videos
The agent makes a narrated video of 30 to 120 seconds from a brief. The video plays on the desktop and on your phone.
- Open browser pageRounding rules — taxlib.devClick "Half-even rule"Rounding rules — taxlib.devExtracted pageHalf-even rule — taxlib.devRounding rulesHalf-even ruledocs.taxlib.dev/rounding/half-even
Rounding rules
Round a money value once, at the end of the calculation.
Rounding at every step can move a total by a cent.
Half-even rule
HB CodeClick “Half-even rule”Read the pageClick “Half-even rule”Read the pageHalf-even rule
A value exactly halfway between two cents goes to the even cent.
Over many totals, the rounding errors cancel out.
Your Chrome browser
The agent searches the web, reads pages, clicks, and types in your own Chrome. A label on the page names each action.
- Explain the rounding fix as audio.Generate speechThe rounding fix, explained · SulafatThe total is rounded once, after tax.
The rounding fix, explained
Playing0:000:380:420:460:500:540:581:021:061:101:141:181:221:261:301:341:381:421:461:501:54/ 3:10Speech
The agent makes an audio file from an answer or a walkthrough. Play the file on the desktop or on your phone.
- Get the setup steps from this tutorial.Extract video contextTutorial · YouTubeFind the steps to set up half-even rounding.
The video gives three steps:
- 1.Install the tax library. (02:10)
- 2.Set the rounding mode to half-even. (05:40)
- 3.Round the total one time, after tax. (09:15)
Notes from a video
The agent gets the steps, the commands, and the decisions from a YouTube video or a recording.
- Mobile notificationRefund tests passAll 15 tests pass. The diff is ready for your review.
Friday, October 9
13:02
Refund tests passnowAll 15 tests pass. The diff is ready for your review.
Phone alerts
The agent sends an alert to your phone when the work is complete, fails, or needs your decision.
Explainer videos, speech, and video notes use your own Gemini API key. The browser tool needs the HB Code Browser Bridge extension for Chrome. Phone alerts need the notifications setting and a connected phone.
Made for daily work
HB Code runs Claude Code with the Claude Agent SDK from Anthropic. It runs Codex with its own build of the Codex app-server from OpenAI. Each agent keeps its own history and its own sign-in.
- 13:002 Queued MessagesDoneWaiting for desktopSendingAccepted
Add a test for zero-quantity lines.
Waiting for desktopSendingAcceptedThen run the checkout tests again.
Messages wait for the desktop
If the phone has no connection to the desktop, the message stays in the queue on the phone. Each message has one identity, so a second try doesn't send it two times.
New session
In shop-api. The agent stays fixed for the session.
Agent
CodexClaudeStart a new conversationOr continue a saved Claude conversation
Tax rounding notes12 min agoWhere does the tax path round a value?CancelStart Claude sessionContinue conversationContinue a saved conversation
A new session can continue a conversation that the agent saved for the project folder. With Claude Code, this includes a conversation that you started in the terminal. After a restart, each session opens with its full history.
Color theme
Each theme has a light and a dark version. The change applies immediately.
HB CodeHB CodeGraphiteCatppuccinNordNordSolarizedGruvboxGruvboxRosé PineTokyo NightTokyo NightEverforestOneTen color themes
Each theme has a light version and a dark version. Your phones use the theme that you select on the desktop.
- cart.tsAutosrc/checkout/cart.ts1import { round } from './money';23// Round once, after tax.4export function total(cart: Cart) {5 const net = sum(cart.lines);6 const tax = net * cart.taxRate;7 return round(net + tax, 2);8}910function sum(lines: Line[]) {11 return lines.reduce(addLine, 0);12}
Syntax colors in the file viewer
The file viewer shows code with syntax colors and line numbers. Markdown files and web pages open as formatted text.
Download HB Code
Install the desktop app on your Mac or Windows PC. Install the iPhone or Android app to control your sessions from your phone.