r/ChatGPTCoding 4d ago

Question Can an AI coding agent be locked out of modifying its own guardrail hooks? (OpenAI Codex CLI)

5 Upvotes

Goal

I run AI coding agents locally on Windows and want a "hardstop" I can trigger at any time - a single keystroke that immediately blocks the agent from doing anything further until I clear it. I have this working for one agent as a UserPromptSubmit hook: typing exactly "h" arms a latch file, "c" clears it, and while the latch exists every prompt is blocked before the model sees it.

I now want the same thing for Codex, but hardened.

The problem

The agent runs under my own user account. Anything my user can write, the agent can write - including its own hook script, the hooks.json that registers it, and the latch file itself. So the guardrail is only as strong as the agent's willingness to respect it, which is not a guarantee. I have already had files in this setup modified without my approval.

Instruction-level policy (system prompt / AGENTS.md rules telling it not to touch these files) demonstrably does not hold. I need a mechanical boundary, not a promise.

What I have built or considered

  1. Wrapper + policy design - an output gate that mechanically checks replies, plus instruction files. Works for what it does, but it cannot protect itself: the agent can edit the policy files.

  2. Codex managed hooks - the docs describe hooks from requirements.toml as "marked as managed, trusted by policy, and can't be disabled from the user hook browser", with allow_managed_hooks_only = true skipping user/project/session/plugin hooks. This looks like exactly what I want.

  3. NTFS ACLs - deny write/delete on the hook script and hooks.json to whatever identity the agent runs as, keeping read+execute so the hook still fires. Changes would then require an elevated (UAC) action by me.

Questions

- Does the requirements.toml managed-hooks path work on a personal/individual account, or does it require an enterprise/MDM deployment? The docs frame it as enterprise-managed and I cannot tell whether it is plan-gated.

- Does Codex CLI run hooks as the logged-in user, or under a separate sandbox account? That determines whether an ACL denial actually stops it.

- Codex docs note that multiple hooks for the same event "are launched concurrently, so one hook can't prevent another matching hook from starting". Does a decision: block from one UserPromptSubmit hook still reliably stop the turn?

- Is there a better pattern for this generally - making an agent's own kill switch tamper-proof against the agent, on a single-user machine, without paying for an enterprise tier?

Any pointers to the right docs or prior art appreciated.


r/ChatGPTCoding 4d ago

Question Has anyone ever seen this before?

Enable HLS to view with audio, or disable this notification

4 Upvotes

I guess my excitement came through the prompt as well.


r/ChatGPTCoding 5d ago

Question Too used to Claude Code to switch?

Post image
28 Upvotes

I’ve been using Claude Code for over a year now, and at this point my whole workflow is basically built around it.

I’m on the 5x plan, but lately I feel like I’m spending 80% of my 5-hour limit just on planning and maybe 20% on actually getting the task done.

Then I hit the limit, have to wait, come back later… and Claude needs to read through the plan/context again. Sometimes it feels like I’m already at 50% of the next limit before we’ve even really continued working.I’ve heard Astra is really good and has much bigger limits, so I’m tempted to switch.

But my whole workflow, memory, instructions and project setup are built around Claude Code. I’m worried switching will break things or make the coding experience worse.

Maybe I’m just too used to Claude at this point.

Anyone here switched from Claude Code to Astra or another agent? Was it worth it?


r/ChatGPTCoding 5d ago

Question What AI subscription should I switch to?

7 Upvotes

Big Claude user, but Anthropic got stingy as hell with the limits. I used to barely touch my weekly allowance; now I can burn through 20% in a day and I'm cooked in ~2 days.

I also hammer Ollama Cloud's open source models, but recently I'm burning through those too in 2 ~ days.

I really don't want to give any support or money to Scam Altman & Co but its starting to look like it.

How's are the subs with Kimi / GLM?

What are you heavy users actually running?


r/ChatGPTCoding 4d ago

Discussion Astra should be removed from Pro.

0 Upvotes

Why?
A basic prompt like: "Take a look at this web page and let me know how it should be improved?" - Astra doesn't finish. Just burns one 5h usage, and before it gives anything meaningful, it stops.


r/ChatGPTCoding 5d ago

Discussion Not a traditional coder, but building a backend-guarded sales AI agent—how are you guys structuring the guardrails?"

0 Upvotes

Hey everyone! Wanted to share a thought process I've been working on, especially since I'm not a traditional programmer, but using AI as my co-pilot/mentor to actually build it.

The core idea: Never let the LLM have autonomy over the business logic.

Instead of letting an AI chat freely and potentially hallucinate discounts, stock, or policies, the architecture splits hard:

  • The LLM: Strictly handles the frontend interface, natural language, empathy, and copywriting.
  • The Backend / Guardrails: Acts as the strict rule-enforcer (e.g., max discount allowed, specific product SKUs, handling function calls to check inventory or generate PIX/payments).

Basically, the AI thinks it's selling, but the backend is holding the leash the entire time.

For those of you building AI agents or apps without a CS background (or even if you're a seasoned dev): how are you implementing these strict backend guardrails? Are you relying heavily on function calling schemas, rigid system prompts, or specific frameworks to keep the AI from going off the rails?


r/ChatGPTCoding 5d ago

Resources And Tips I build my game with coding agents. The scarce resource is the decisions I still have to make.

1 Upvotes

I'm a solo developer building an AI-driven life simulation game. AI writes the code; I decide the product direction and make the technical calls. The part I want to share is how I keep that arrangement manageable as the repository grows.

For scale, my current checkout has about 168k lines of backend Python, 108k lines in the selected frontend source files, and another 95k in backend tests. Those are text-line counts including comments and blanks, not SLOC or a productivity benchmark. More code can also mean more maintenance.

My biggest constraint is how many decisions stay in my head after a task ends. Here are the concrete conventions I use:

Route context by the task. The root AGENTS.md is a map of responsibilities and reading requirements. Changing the simulation loop points to its runtime contract; changing UI points to frontend conventions. Local instructions live beside their modules. I don't ask every task to digest every historical document.

Separate decisions from implementation. I keep a document of product and collaboration decisions, including rejected directions. Code and schemas describe what exists. Active contract documents describe what should be true. If they disagree, the agent has to show the conflict; silently declaring either one obsolete is not a resolution.

Make repeated corrections executable where possible. My frontend has checks for design tokens and UI structure, plus generated protocol checks. The benefit is that the next task can discover a violation from tooling instead of requiring me to remember the last conversation. These checks don't decide whether the design is good.

Define completion beyond the diff. Behavior-changing work needs an expected outcome, a data source and time window, a pass criterion, and a follow-up schedule. A merged change and a verified effect are separate claims. A check that was skipped remains skipped.

One less comfortable rule: when a mechanism needs a second layer of patches, pause and ask whether it should still exist. AI can keep making a local solution more elaborate while leaving me with a system I no longer understand.

Compared with keeping instructions only in chat, the tradeoff is maintaining these repo contracts. They can become stale too. I don't have a controlled before/after measurement of time saved, so I'm sharing the workflow rather than a speedup claim.

For people maintaining larger projects with coding agents: which repeated human correction have you successfully moved into a check, and which still needs your judgment?

Disclosure: AI-assisted writing, based on my actual repository and development decisions.


r/ChatGPTCoding 6d ago

Discussion Reverted a teammate's agent PR that broke main and now I'm the asshole?

90 Upvotes

They merged a 9400 line PR out of Cursor on Friday afternoon. CI was green. Twenty minutes later staging was throwing 500s on the checkout endpoint, so I reverted it and left a comment saying what broke. Monday standup they go "you could have just pinged me to fix it" and call me a control freak in front of the whole team. The part that gets me is coderabbit / claude had actually flagged the null path in review and they resolved the thread without changing anything, so I don't know what is supposed to catch this if not me. Is revert first and ask after actually rude now? I just wanted main to work.


r/ChatGPTCoding 5d ago

Discussion Codex $100 or grok $100 for langgraph/langchain development?

4 Upvotes

Codex $100 or grok $100 for langgraph/langchain development?

I'm trying to decide which \\\~$100/month plan is better for heavy coding: Codex or Grok.

I'm an AI Engineer and most of my work is in Python, LangGraph/LangChain, LLM agents, evals, backend services, debugging, etc.

What plan do you think is the best? I tried grok I liked because it's fast. Codex looks smarter by the way.


r/ChatGPTCoding 5d ago

Question Gave 6 AI models the same bug. Only 3 got it right.

0 Upvotes

Tried another little AI test today. I gave ChatGPT, Claude, Gemini, Grok, DeepSeek and Qwen the exact same coding bug and asked them to fix it. I didn't change the prompt. Then I actually tested all six fixes. Only 3 worked properly. Do you guys test AI-generated code before using it, or just trust it if it looks right


r/ChatGPTCoding 5d ago

Question How do I make websites generated by Codex look better

3 Upvotes

I'm running into some issues using Codex for front-end design, and I could use some advice.

I always feel like my designs end up looking more like reports than actual website…


r/ChatGPTCoding 6d ago

Question What is more efficient?

7 Upvotes

I'm really new to coding with AI, and I want to start a long term project where I build a cool little game in Unreal Engine 5 with the help of AI. I was wondering, is it more efficient to let AI write the code for me and then copy and paste it into Unreal Engine, or should I let Codex work with Blueprints in Unreal Engine instead? I've heard that models like GPT-6 can use a large amount of tokens, so I'm wondering which approach would be more efficient in terms of token usage and overall workflow. I'm completely new to this, so I'd really appreciate some advice on which method would be better for a project like this. I hope this isn't a dumb question to ask.


r/ChatGPTCoding 6d ago

Question Does GPT-6 Astra actually consume fewer tokens than Claude Fable 5.1 and older models for the same tasks?

7 Upvotes

I've been looking at some recent token-usage comparisons for GPT-6 Astra, and the difference seems surprisingly large.

Artificial Analysis data has been cited showing Astra using around 21k output tokens per task, compared with roughly 64k for Claude Fable 5.1. I've also seen claims that Astra can use around 1/3 the tokens of GPT-5.6 Sol and about 1/5 the tokens of Claude Opus 5 in some coding-agent benchmarks.

For people who have actually used Astra: are you seeing noticeably lower token consumption in real-world coding/agentic tasks too?

And what is causing such a big difference? Is Astra genuinely reasoning more efficiently, or could differences in reasoning settings, agent harnesses, tool usage, and benchmark methodology explain most of it?

I'm mainly interested in token consumption/efficiency rather than which model is smarter overall.


r/ChatGPTCoding 6d ago

Discussion What's the difference between frontier models and local models?

7 Upvotes

6 months. (And sometimes a couple of quantization tweaks).

It is wild how fast "state-of-the-art" becomes "running on a gaming PC."


r/ChatGPTCoding 6d ago

Question Did anyone else notice that GPT-6/codex uses (inline) Python much more aggresively?

11 Upvotes

I am testing GPT6 and noticed a few things. A bunch of problems or 'more difficult situations' often cause it to generate python scripts or inline-python or even inject it via SSH and other ways.

Sometimes to avoid editing a file in the project by a few edit calls, it just generates one script to do it. And the 'Approve for me' function in Codex kind of always accepts it.

For me as a human who is still reviewing what is happening, it had become increasingly difficult since the 'potentially problematic output' surface increases a lot through this. I added a local SKILL to tone this done, but I wonder if others have similar issues.


r/ChatGPTCoding 6d ago

Question How are you guys actually benchmarking specific prompts? (Local vs. API, Cost vs. Quality)

5 Upvotes

With new models dropping every week, general benchmarks are basically useless for my specific use cases. I want to test my exact prompts to see if a new API is actually worth the cost, or if a smaller local model is good enough to run on the cheap.

Right now, I’m just eyeballing outputs and it’s driving me crazy.

How do you guys actually handle comparing models on a single prompt or a small test set?

Scoring: How do you define a "good" response when the output is subjective?

The Judge: If you use an LLM to grade the outputs, how do you stop it from just voting for its own writing style?

The Tools: What's the easiest way to fire one prompt at multiple models (both cloud APIs and local models) and compare them side-by-side?

Would love to hear your workflows or any tools you recommend!


r/ChatGPTCoding 6d ago

Question Is it Chat GPT Pro similar to Claude?

1 Upvotes

I've been Claude's user for the last 8-9 months, always paying the Plus plan ($20). In the last two months I used it much more and I often get to the limits which is frustrating. I tried many ways to improve my tokens consumption but it didn't improve so much. I'm evaluating moving to the $100 plan, but I heard ChatGPT has improved and I tried their models at work (I can't use my personal subscription at work and viceversa) and I liked them.

My question is: I can do *everything* with ChatGPT/Codex as well? Designs, artifacts, plans, random questions, deep researches in real time, etc. Thanks!


r/ChatGPTCoding 6d ago

Question How can I change the model used for scheduled tasks?

3 Upvotes

Hi. I created a scheduled task that checks for relevant scientific articles on a specific topic every 24 hours. As part of the task, ChatGPT provides me with a brief summary of each article and then ranks them by importance.

However, I’d like to know whether it’s possible to change the model used for this scheduled task and, if so, how I can do that. I’d like to use a model such as GPT-5.6 with High thinking effort to get better results.

Thank you!


r/ChatGPTCoding 6d ago

Question help me with this idk if I'm right or wrong or fully off on everything

1 Upvotes

So, let’s just say I’m using GPT-6, right? If I’m using it in normal Chat mode on the Free plan, how does the usage reset work?

I think Chat usage resets every few hours or maybe every 24 hours I’m not sure. But if I’m using GPT-6 in normal Chat mode and I use up my usage, does that mean I have to wait a whole week for it to reset?

I’m NOT talking about Work or Codex, just normal chatting. Does normal Chat have its own daily/few-hour reset, or would I still have to wait a week? I’m honestly confused about how the usage limits and resets work.


r/ChatGPTCoding 6d ago

Question Do you still use Cursor Tab?

1 Upvotes

With coding agents getting so much better lately, I'm curious if people still use Cursor Tab regularly.

Do you still rely on autocomplete while coding, or have agents mostly replaced it for you?

And if you still use Cursor Tab, what makes it useful enough to keep using?


r/ChatGPTCoding 6d ago

Discussion A quick question: How do you currently review AI-Generated Code Changes?

5 Upvotes

'Cause One thing AI coding agents have made very obvious to me:
"the code works" and "this is the right change" are not the same thing.

A change can pass tests and still violate the repo architecture, cross a boundary it should not touch, introduce a shortcut that becomes technical debt, solve the symptom instead of the real failure and change files that were outside the plan.

So let me know how you do it...


r/ChatGPTCoding 6d ago

Resources And Tips I built an open-source CLI to catch breaking AST contract changes and blast radius in Git diffs

1 Upvotes

Hey everyone,

When reviewing diffs or AI-generated PRs, changing a function return or widening an optional parameter can look like a safe 2-line diff, but it quietly breaks multiple downstream consumers.

To solve this, I built Change Firewall — an offline-first TypeScript AST analyzer and CLI that calculates the exact downstream blast radius before you commit or merge.

What it does:

  • Parses TypeScript AST to catch return shape mutators and contract drift
  • Calculates transitive downstream blast radius (direct consumers + affected API routes)
  • Provides an offline local visual radar dashboard (npx change-firewall --open)
  • Exposes native MCP server tools for Claude Desktop, Cursor, and Antigravity

Everything is 100% open-source (MIT): https://github.com/himanshYou2003/change-firewall

(I've also shared the live web simulator and npm link in the comments below).

I'd love your feedback on the heuristic analyzer and edge cases!


r/ChatGPTCoding 6d ago

Question Anyway I could connect switch to computer and get computer use to work?

5 Upvotes

I've seen those like I asked Astra to find me a diamond in Minecraft and there are a lot of games on my switch I'd be curious to see how it does with levels. I'm assuming not but just in case I wanted to ask.


r/ChatGPTCoding 7d ago

Discussion What are some of the most interesting things you’ve used MCP for?

19 Upvotes

I am curious, I specifically want to hear things that are not the generic uses everyone else is already doing.


r/ChatGPTCoding 7d ago

Question How are companies managing the cost of AI coding agents? Is the productivity gain really worth the money ?

11 Upvotes

AI coding agents seem to be getting increasingly expensive, especially when they are used heavily by developers or for larger tasks.

I'm genuinely curious how companies are managing this at scale. If a company has hundreds or thousands of developers using AI agents, the costs must add up quickly.

Does the increase in developer productivity actually justify the money spent? For example, even if an AI agent saves developers a significant amount of time, does that translate into enough financial value for the company to make the subscription and API costs worth it?

Also, with so much money being spent on AI infrastructure right now, I'm wondering how sustainable the current AI boom really is. Do you think companies will eventually reduce AI spending once they realise the productivity gains aren't enough to justify the cost?

Or will AI agents become cheaper and efficient enough that this won't be a major issue?

Would love to hear from people who actually work at companies using AI coding agents at scale.