How to Use Claude Code 4.8 for Real Coding Work
I had a migration problem. Three hundred and twelve files across a monorepo, all using a deprecated internal API wrapper that needed to be swapped out for our new service layer. I estimated two weeks of mind-numbing find-and-replace work. Instead, I kicked it off in Claude Code with Opus 4.8 and went to grab coffee. By the time I came back, it had migrated 287 files, opened a PR, and left me a clean list of the 25 files it wasn't confident about.
That's when I realized this wasn't just another incremental model update. Opus 4.8 fundamentally changes what you can hand off to an agent. Let me walk through how I actually use it day-to-day, including the things I got wrong along the way.
Setting Up and Getting Started
First, make sure you're actually running Opus 4.8. I wasted an hour wondering why my results were mediocre before I realized I was still on Sonnet. Check your model with:
claude config get model
If it's not set to opus, update it:
claude config set model claude-opus-4-8
The big shift with 4.8 is the /goal command. This is how you hand off long-running work. Instead of babysitting Claude through each step, you describe the end state you want and let it figure out the path.
The /goal Command: Your New Best Friend
Here's how I kicked off that migration I mentioned:
/goal Migrate all files in src/services/ from the old DataWrapper class to the new ServiceLayer pattern. The mapping is: DataWrapper.fetch() -> ServiceLayer.query(), DataWrapper.update() -> ServiceLayer.mutate(), DataWrapper.delete() -> ServiceLayer.remove(). Update imports, call sites, and tests. Open a PR when done. For any file you're unsure about, add a TODO comment and list it in the PR description.
The key things I learned about writing good goals:
Be specific about the transformation. I didn't say "update the API calls." I gave it the exact mapping. Vague goals produce vague results.
Tell it what to do with uncertainty. That last line about TODO comments was crucial. Without it, Claude would either guess wrong or stop and ask me about every ambiguous file. With it, I got a clean PR and a manageable list of files to review manually.
Define the done state. "Open a PR when done" gives it a clear finish line. Otherwise it might keep refactoring forever.
Effort Calibration: The Setting That Saves You Money
This was my biggest early mistake. I ran everything at maximum effort because, well, why wouldn't you? My API bill that first week was painful.
Opus 4.8 introduces effort levels, and they matter enormously. Here's what I've settled on after burning through too many tokens:
- Low effort (
/effort low): Quick questions, single-file edits, formatting fixes. Think 30-second tasks. Claude will be concise and fast. - Medium effort (
/effort medium): Multi-file features, moderate refactors, writing tests. This is my default for most work. - High effort (
/effort high): Codebase-scale migrations, complex bug investigations, architectural decisions. Save this for the big stuff.
You can set effort per-goal too:
/goal --effort high Migrate the auth system from JWT to session-based tokens
For my 312-file migration, high effort was appropriate. For fixing a typo in a README, it absolutely wasn't. I now keep my default at medium and only crank it up when the task genuinely needs deep reasoning.
Subagents: How 4.8 Handles Big Codebases
Here's something that surprised me: when you give Opus 4.8 a large task, it spawns subagents. I noticed this when I saw it working on multiple files simultaneously during my migration.
This is automatic behavior, but you can influence it. When I ran:
/goal Find all components that directly access window.localStorage and create a shared StorageService wrapper. Update each component to use the new service.
Claude split this into subagents: one to search for all localStorage references, one to design the StorageService interface, and then multiple agents to update different component directories in parallel. The search agent finished first, fed results to the design agent, and then the update agents went to work.
The practical implication: for large tasks, give Claude the full scope upfront. Don't drip-feed information. It plans better when it can see the whole picture.
Real Workflow Examples
Bug Sweep Across a Codebase
I had a tricky issue where users were getting logged out intermittently. I couldn't reproduce it reliably.
/goal --effort high Investigate the intermittent logout bug. Check all auth token refresh logic, session storage handling, and race conditions in the auth middleware. Look for any place where tokens could be cleared unexpectedly. Provide a detailed analysis with likely root causes and suggested fixes.
Claude spent about 15 minutes reading through our auth flow, middleware, and token refresh logic. It found a race condition where two concurrent API calls could both trigger a token refresh, and the second one would invalidate the first's new token. It wrote a fix with a mutex around the refresh logic and updated the tests. Legitimate bug, legitimate fix, and I never had to manually trace the code.
Feature Implementation
For a new feature, I've learned to provide context about patterns to follow:
/goal Add a "recently viewed items" feature. Follow the same pattern as the existing "favorites" feature: create a hook in hooks/, a context provider in context/, and a panel component in components/panels/. Store the last 20 viewed item IDs in localStorage. Add the panel to the dashboard layout.
By referencing an existing pattern, I got code that was consistent with our codebase instead of something that looked like it came from a tutorial.
HTML Dashboard Quick Build
I needed an internal monitoring dashboard and didn't want to spin up a full React app:
Build a single HTML file dashboard that fetches from /api/metrics and displays: request count (line chart), error rate (gauge), and top endpoints (table). Use Chart.js from CDN. Auto-refresh every 30 seconds. Style it cleanly with inline CSS.
Got a working dashboard in one shot. It wasn't pretty enough for production, but for an internal tool, it was perfect.
What I've Learned the Hard Way
Always review before merging. Claude Code with 4.8 is impressively accurate, but it still makes mistakes. In my migration, it correctly handled 287 files but misinterpreted a custom decorator in 3 files. The TODO comment system caught 22 of the 25 uncertain files, but those 3 slipped through. Always review the diff.
Context files matter. If your project has a CLAUDE.md file, keep it updated. I added our coding conventions, common patterns, and file structure to mine. The difference in output quality was significant.
Cost awareness is real. A high-effort goal on a large codebase can consume serious tokens. I now estimate: small task = cents, medium task = a dollar or two, large migration = $10-30. Track your usage.
It struggles with very novel architectures. When I asked it to implement something using a pattern it hadn't seen before (a custom event sourcing system with our specific conventions), the results were mediocre. It excels at applying known patterns, not inventing new ones.
The verbosity has changed. Opus 4.8 is less chatty than previous versions by default. If you want detailed explanations, ask for them explicitly. If you just want the code, it'll give you the code.
Practical Tips Summary
- Use
/goalfor anything that takes more than two steps. It's the whole point of 4.8. - Set effort levels intentionally. Default to medium, reserve high for complex tasks.
- Provide exact mappings and patterns. Ambiguity is the enemy of good agent output.
- Tell it how to handle uncertainty. TODO comments, skip files, ask me—pick one.
- Keep your
CLAUDE.mdcurrent. It's the context that makes everything work better. - Review every PR. Even 95% accuracy means 5% of files need human eyes.
- Watch your token spend. Big migrations cost real money. Budget accordingly.
Claude Code with Opus 4.8 isn't going to replace developer judgment. But for the right tasks—migrations, bug sweeps, pattern-based feature work—it's genuinely transformative. That two-week migration I mentioned? It took me half a day of review instead. The tool earned its place in my workflow, but only because I learned to use it with appropriate expectations and safeguards.