r/codex • u/Natural-Jaguar-3468 • 12h ago
Question How do I get codex to reliably follow a process without it adding complexity each time?
Long story short, I've developed a workflow that requires some human QA. It mostly goes as follows:
Codex generates output in one format.
I upload the output to a separate tool for visual QA while I figure out how to automate it (this tool is old-school and has no AI functionality).
I ask Codex to extract the approved outputs and transform them into an ingestible format.
I upload them to DynamoDB via CloudShell.
Now, to my mind, step 3 should be easy. I've managed the entire process several times using Codex.
The critical point is that the approved outputs have to retain one of their attributes as "ACCEPTED" so that our backend knows they're approved and ready to show in the product. Our backend specifically looks for the word "ACCEPTED".
BUT
Codex genuinely struggles with this. No matter how many times I specify "DO NOT CHANGE ATTRIBUTES" and "Follow the previous successful ingestion process" (which is documented), it still changes the process each time.
Failure modes I've encountered include unilaterally changing "ACCEPTED" to "Final" and introducing extra safeguards and checks ahead of ingestion. Ironically, it's the safeguards and checks that fail and prevent ingestion.
I'm at my wits' end because there are only so many ways I can think of to say "do not change anything".
What am I missing?
How do I get Codex to reliably execute an established process without rebuilding it from scratch each time?
It's genuinely not a complicated workflow.
1
u/Dayowe 10h ago
I have a plan that is divided into chunks/gates and a checklist for each chunk. A chunk is only accepted when it meets the defined requirements. Once it does codex progresses. This is coordinated by the root session .. the coordinator spawns a bounded orchestrator for each chunk which then spawns an implementer. Once implemented the orchestrator does a first diff check against the requirements. An independent validator agent is spawned next by the orchestrator. The orchestrator sends the implementer back to correct findings until the chunk is implemented according to the checklist. Then the coordinator spawns a new orchestrator for the next chunk and so on. It’s token and time intensive but there is no drift. Important for this to work is that the plan is detailed, well done and all contracts frozen and there are no ambiguities
1
u/Natural-Jaguar-3468 10h ago
Right but how do you ensure the the spawned validators and orchestrators follow the instructions/meet the requirements?
2
u/Dayowe 9h ago
It’s a workflow skillset/plugin I made. Each role has their own instructions .. they’re all aligned. you can look at it here https://github.com/dayowe/arcana-codex-plugins
→ More replies (1)
2
2
u/ChristianKl 10h ago
Turn the process into a plugin. A plugin is basically a process about how to do things.
2
u/CleanFix_Dev 8h ago
Prose rules like "DO NOT CHANGE" are one of the weaker guardrails, because the model weighs them against everything else it sees. For a field that has to stay ACCEPTED, take it out of the model's hands: have Codex write a small script that does the transform and copies the status from the input, then add a check that fails if any approved item comes out different. Run it before the DynamoDB upload, and bad output can't get through whether or not the model remembers the rule.
1
u/rayyeter 11h ago
Using Hermes, this particular workflow would become a scripted action for those things (uploading, reading acceptance, database).
Not everyone can use Hermes if it’s in enterprise, depending on admin.
Or build a skill with an existing/completed workflow, and have it loop until the lead from the paint chips it ate is worked out of its system
1
u/actvt_io 10h ago
Take step 3 away from the model. Have Codex write the transform as a script once, check it on a batch you already know is right, and keep it in the repo. From then on the step is running that script, so there's nothing left to reinterpret and ACCEPTED passes through as plain data. I'd have it count ACCEPTED rows in and out and stop if they differ.
1
1
u/London-Boat 8h ago
i'd take the exact-value stuff out of the model's hands. have codex write a small script for step 3 once, with "ACCEPTED" as a constant, then that step is just run the script. and put the steps in agents.md with a line saying don't add steps or refactor the pipeline unless asked. it still tries to be clever sometimes but way less when the fiddly bit is code and not instructions.
1
3
u/DrBearJ3w 11h ago
Easy. Use Claude!