AWS Builder Center
CodePinion __init__

CodePinion __init__

Most AI coding tools stop at the boundary where work actually happens — they write the migration but don't run it, describe the sprint but don't create it. CodePinion is a cloud development platform built the other way round, where the assistant operates the platform through 195 permissioned tools, and the interesting problem stops being "can it act" and becomes "what stops it acting wrongly".

Software Engineer
Most AI coding tools stop at the boundary where work actually happens — they write the migration but don't run it, describe the sprint but don't create it. CodePinion is a cloud development platform built the other way round, where the assistant operates the platform through 195 permissioned tools, and the interesting problem stops being "can it act" and becomes "what stops it acting wrongly".



CodePinion: a development platform where the AI does the work

I build software in Nairobi, on a connection that makes every round trip count. That constraint shaped a frustration I couldn't shake: the AI tools I used were excellent at describing work and useless at doing it. They'd write the migration and leave me to run it. Draft the sprint and leave me to type it in. Explain the fix and leave me to apply it across nine files.
The last mile stayed manual — and the last mile is tedious precisely because it's mechanical.
So CodePinion is a cloud development platform — repositories, sprint planning, live workspaces, databases, deployments — where the assistant isn't a sidebar that suggests things. It plans the sprint, assigns the work, edits the code, runs the tests, provisions the database and opens the merge request, through the same service layer a human clicking the dashboard goes through.
Once you build that, you discover the actual engineering problem is somewhere else entirely.

The problem isn't capability. It's consent.

An agent that can genuinely do everything a user can do is one bad inference away from doing something you can't undo.
The industry's usual answer is a blocklist: forbid the scary-sounding verbs. That fails in both directions. It blocks legitimate work because a word sounded alarming, and it misses the genuinely dangerous thing because it didn't pattern-match. A blocklist that permits  run_shell_command  while forbidding  delete_database  is theatre — the shell can drop the database.
CodePinion's rule is different: the agent may do anything an authorised human can do through the dashboard, and friction is proportional to how hard the action is to undo.
Every tool declares a tier:
Tier
Tools
Gate
Read
74
Runs immediately. Nothing observable changes.
Write
119
One approval showing exactly what will happen — the diff, the command text, the rows.
Irreversible
2
Typed resource name plus a one-time code emailed to the account holder.
Only two tools out of 195 are irreversible: deleting a repository, and deprovisioning a database. Everything else is recoverable, so everything else gets the lighter gate.
Shell execution is deliberately Write tier, not exempt and not elevated. A shell command can trivially do what any irreversible tool does —  DROP DATABASE ,  rm -rf , a force-push. Giving it its own escape hatch would make every other gate decorative, because the agent could simply shell around them. So it's gated like every other write: the human sees the exact command text and approves once.
Read tier runs without asking, and that's a deliberate decision too. If you make people confirm listing sprints, you train them to click through confirmations without reading — and then the confirmation that mattered gets clicked through as well.

Three things I'd build the same way again

Fewer tools made the agent better

The registry holds 195 tools. Early on, every request sent all of them.
The token cost was the smaller problem. The real damage was accuracy: choosing among 195 options measurably degraded selection. The clearest symptom was the agent calling  create_workspace  while the user was sitting inside a workspace — not a hallucination so much as a bad choice made under too many options.
The fix was scoping. The tool set is split into seven bundles, chosen from the surface the user is actually on:
  •  agent_planning  — 73 tools
  •  agent_infra  — 60
  •  agent_general  — 53
  •  agent_orgs  — 42
  •  agent_coding  — 26
  •  read_only  — 19
Anything outside the bundle is one  find_tools  call away. That's the part that makes it work: a narrow default is fine because escape is cheap. Without the escape hatch it's a wall, and walls produce an agent that confidently tells you something is impossible.

Confirmation should be a negotiation, not a yes/no

Asked to clear out duplicate tasks, the agent proposed thirty. Twenty-seven were right.
With approve-or-reject, the only moves are "delete all thirty" or "cancel and re-ask" — so the user rejects a call that was ninety percent correct and starts over. That's a terrible interaction, and it's the default everywhere.
So a confirmation response can now narrow the call. The dialog lists every item with a checkbox, and the reply carries only the surviving subset. Untick three rows, approve, and exactly twenty-seven go.
The invariant that makes it safe to let a client rewrite a pending call is that a response may only ever narrow, never widen. An id the user was never shown is refused outright rather than filtered out — because that isn't a narrowing, it's an attempt to delete something nobody approved.
There's a subtlety underneath. The typed confirmation carries the count —  Version 1 - 27 , not just the sprint name — and the server re-derives that string from the final selection rather than the proposed one. Untick a row and the text you must type changes. Validating against the original count would let a narrowed call through on a number that no longer describes it.

Audit is what makes it trustworthy at an organisation

Every Write and Irreversible call is recorded with its arguments, tier and outcome. Not "the AI made some changes" — the actual call, the actual parameters, whose authority it ran under.
This turns out to matter more than the gating for anyone deciding whether to let a team use it. Gates prevent; audit explains. Retrospectively answering "what did it do, and why did that get approved" is the question that comes up after something goes wrong, and no amount of preventive design answers it.

How it fits together

A Django backend serves both a REST API and a WebSocket chat channel. The agent lives on the chat channel, and its tools reach the same domain services the REST API uses.
That's the constraint that keeps the whole thing honest: an agent action cannot bypass a validation the dashboard enforces, because it goes through the same code. Adding a capability means writing a tool over existing services — never a second write path into the database.
Around that: Celery over RabbitMQ for background work, PostgreSQL as the source of truth, Redis for the channel layer, and Kubernetes running all of it.
Workspaces are pods, not folders. A separate runtime service owns every container — it provisions the pod, mounts the working copy, starts language servers per detected toolchain, streams shell and file operations, and reclaims idle workspaces. The web tier holds no cluster credentials at all. One boundary for all container work means quotas and cleanup have a single owner rather than being everyone's problem.
The model layer runs 26 models across six providers. One resolution path: a user's own API key wins when present, otherwise the platform key is used and the call is charged against a rolling budget. Cost is recomputed from stored token counts rather than trusted at write time.

What this cost me to learn

An availability listing is not proof of availability. A provider's model-listing endpoint returned models that returned 404 on an actual call. We shipped a dead model on the strength of that listing, and the test meant to catch it passed because it compared against a hand-copied list containing the same wrong id. Every model id is now verified with a real call.
A free tier can bill you silently. Five models were priced at zero in the catalogue — but cost resolution prefers a live pricing table, and an old row still carried the paid rate. Nothing fails when a price merely exists. The fix wasn't just correcting the data; it was making the refresh job skip anything the catalogue marks free, so the rule is enforced rather than trusted to a hand-curated list.
Tests can agree with the bug. Migrating a field, three call sites were missed and the entire suite passed — because every fixture wrote the old field. The tests encoded the same assumption the code did. Grep found what the suite could not.

Where it goes next

Cross-repository agents that reason over an organisation's whole codebase, agent discovery so teams can find and audit each other's agents, and taking the narrowing protocol further — it works for deletes today, and the same shape generalises to any bulk write.
The thread running through all of it is the same: an agent is only as useful as the reach you're willing to give it, and you're only willing to give it reach you can see, bound and undo.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article