My AI workflow with Codex+AGY can save a lot of tokens without loosing quality

My AI workflow with Codex+AGY can save a lot of tokens without loosing quality

One thing that kept annoying me with AI coding tools was how often they had to rediscover the same project context.

Every new session felt like

  • read the architecture again
  • Find the same APIs again
  • trace the same code paths again
  • explain the same decisions again
  • burn a bunch of tokens before doing any actual work

So I started building a small local system around routing, indexing, caching, memory, and custom skills.

The main idea is simple:

Give the AI only the context it actually needs for the task.

Obsidian is basically my project brain.

I keep long-term project knowledge there:

  • architecture decisions
  • API docs
  • frontend/backend maps
  • events and flows
  • tech debt
  • session notes
  • lessons worth remembering

But I don't want the AI reading the whole vault.

The rule is to open the most relevant note first, then expand only if needed.

I run brief.ps1 at the start of a session.

Something like

powershell -NoProfile -File ai-workspace/scripts/brief.ps1 `
  -Role reviewer `
  -Query "API contract validation"

It does most of the boring context gathering for me.

It checks things like

  • current handoff
  • frontend/backend Git heads
  • dirty files
  • what kind of task I'm asking for
  • relevant domain manifests
  • research notes
  • cached fixes
  • matching memory entries
  • the top 2 relevant skills

Then it suggests what the AI should look at next.

This alone cuts down a lot of pointless repo exploration.

I use small custom skills instead of one giant prompt.

I have skills for repeatable tasks like

  • code-traversal
  • diff-scope
  • root-cause-analysis
  • api-docs-verify
  • api-contract-validator
  • security-audit
  • test-generator

The important part is that I don't load every skill.

The catalog has a rough idea of how expensive each skill is, and the workflow normally picks a maximum of two.

So if I'm reviewing a small API change, the AI doesn't need instructions for security audits, test generation, architecture analysis, and everything else at the same time.

I also added persistent project memory.

Before doing something, I can search previous knowledge:

powershell -NoProfile -File ai-workspace/scripts/brain-recall.ps1 `
  -Lookup "payment callback validation"

Instead of opening a giant memory file, it checks a small index first and loads only matching entries.

After a useful session, I save things like

  • what the problem was
  • What fixed it
  • why the fix worked
  • what failed
  • which files changed
  • anything worth remembering next time

The idea is that if I solve the same type of issue three months later, the AI shouldn't have to rediscover everything from scratch.

I use indexes and caches for the mechanical stuff.

I also have scripts for things that don't really need an LLM:

generate-index.ps1
generate-diff-brief.ps1
compile-hot-cache.ps1
compile-incident-cache.ps1
check-staleness.ps1

They generate things like symbol indexes, endpoint indexes, Git diff summaries, known fixes, incident history, and stale-doc checks.

My thinking is

If a script can cheaply figure something out once, don't pay the model to figure it out repeatedly.

I split agents by responsibility too.

Instead of one agent doing everything, the flow is roughly:

Organizer
   ↓
Planner
   ↓
Builder
   ↓
Reviewer

And each one gets a small handoff containing:

  • objective
  • current status
  • decisions
  • changed files
  • checks already done
  • blockers
  • next step

No giant conversation history.

No copying the full transcript between tools.

No re-explaining the project from zero every time.

My current token rules are pretty simple.

  • load the minimum context
  • Use max 2 task skills by default
  • only read routed files
  • Don't keep raw output around unnecessarily
  • Save important decisions into memory
  • Validate specific things instead of scanning everything
  • shrink context harder when the token budget starts getting tight

The overall idea is basically

route the context with scripts
Use skills for specialized work.
Use indexes instead of repeated searching.
Use Obsidian for knowledge that shouldn't be forgotten.

u/Taki_7980 — 2 days ago

Can someone help me with my panic attacks with this

The thought of this fact makes me panic attacks so recently I joined a company and I'm working quite well there it's going super smooth after August it will be my 3rd month in this company I'm able to do mostly everything not the documentations and everything because I suck at it but lately I'm having this thought that I can't be doing this for the rest of my life i want to do freelancing I want to be independent I'm 24 now

But here is the thing I'm too afraid to do anything am I a coward maybe I am... I waited 3 years to get a tech job because i didn't have a technical degree with me and in my country that's the ultimatum if you don't have skills and you still have a degree you can just be a developer

I know I have waited 3 years to get this job but when I try to imagine the future I'm scared can I do it for the long run i don't know that's why I'm getting panic attacks recently but can I do freelancing I have never tried it

I don't know man I'm such a mess I'm sorry

reddit.com
u/Taki_7980 — 11 days ago
▲ 3 r/theVibeCoding+1 crossposts

What will be the optimal way

Here is the thing in my current workflow I use codex + agy (ide+cli)....

I was planning with codex and building with agy but I was thinking why not use openrouter I want to know will it be sufficient? I mean I can use multiple models with the help of openrouter but I don't quite understand how it's billing works like do I have to pay monthly like codex and Claude what is it ? And on the other hand can I wire it into codex or Claude to use the api key to access the models also I'm on a 20$ plan on codex

reddit.com
u/Taki_7980 — 12 days ago

Which one should I choose? Codex or Claude code for 20$ plan

So I was basically using codex for the past few months I think it's pretty good.... I have created many skills for my project that are basically saving so many tokens....

I have used obsidian documentation for the project and created skills like code-traversal and created a second brain and a context file which stores the context data for that project.....

But recently I think codex is consuming tokens at a rapid speed but all I do is review the code if there are vulnerabilities then I'll just fix it with codex and review it again

My workflow is simple i create plans with agy then build with the IDE (ANTIGRAVITY) and review it with codex

Should I try Claude code for this month and see if my workflow is getting better or not ? Or should I just stick with codex

I'm confused which one is effective and cost efficient here

reddit.com
u/Taki_7980 — 19 days ago

Which one should I choose? Codex or Claude code for 20$ plan

So I was basically using codex for the past few months I think it's pretty good.... I have created many skills for my project that are basically saving so many tokens....

I have used obsidian documentation for the project and created skills like code-traversal and created a second brain and a context file which stores the context data for that project.....

But recently I think codex is consuming tokens at a rapid speed but all I do is review the code if there are vulnerabilities then I'll just fix it with codex and review it again

My workflow is simple i create plans with agy then build with the IDE (ANTIGRAVITY) and review it with codex

Should I try Claude code for this month and see if my workflow is getting better or not ? Or should I just stick with codex

I'm confused which one is effective and cost efficient here

reddit.com
u/Taki_7980 — 19 days ago

Which one should I choose? Codex or Claude code for 20$ plan

So I was basically using codex for the past few months I think it's pretty good.... I have created many skills for my project that are basically saving so many tokens....

I have used obsidian documentation for the project and created skills like code-traversal and created a second brain and a context file which stores the context data for that project.....

But recently I think codex is consuming tokens at a rapid speed but all I do is review the code if there are vulnerabilities then I'll just fix it with codex and review it again

My workflow is simple i create plans with agy then build with the IDE (ANTIGRAVITY) and review it with codex

Should I try Claude code for this month and see if my workflow is getting better or not ? Or should I just stick with codex

I'm confused which one is effective and cost efficient here

reddit.com
u/Taki_7980 — 19 days ago

Which one should I choose? Codex or Claude code for 20$ plan

So I was basically using codex for the past few months I think it's pretty good.... I have created many skills for my project that are basically saving so many tokens....

I have used obsidian documentation for the project and created skills like code-traversal and created a second brain and a context file which stores the context data for that project.....

But recently I think codex is consuming tokens at a rapid speed but all I do is review the code if there are vulnerabilities then I'll just fix it with codex and review it again

My workflow is simple i create plans with agy then build with the IDE (ANTIGRAVITY) and review it with codex

Should I try Claude code for this month and see if my workflow is getting better or not ? Or should I just stick with codex

I'm confused which one is effective and cost efficient here

reddit.com
u/Taki_7980 — 19 days ago

What plugins can I use to make it better

​

Here is the thing I like the 5.6 sol and I'm using it on low to review my code

I use ponytail+caveman to reduce the token consumption on the other hand I have created skills like code-traversal which is helping codex to traverse the codebase faster and cheaper and I have documented and indexed my project as well now I want to know what plugins or ways i can try to make it more efficient from every aspect

I have documented and indexed my project with obsidian

So what things can I add on now like plugins or anything else also I'm on a 20$ plan

reddit.com
u/Taki_7980 — 24 days ago

What plugins can I use to make it better

​

Here is the thing I like the 5.6 sol and I'm using it on low to review my code

I use ponytail+caveman to reduce the token consumption on the other hand I have created skills like code-traversal which is helping codex to traverse the codebase faster and cheaper and I have documented and indexed my project as well now I want to know what plugins or ways i can try to make it more efficient from every aspect

I have documented and indexed my project with obsidian

So what things can I add on now like plugins or anything else also I'm on a 20$ plan

reddit.com
u/Taki_7980 — 24 days ago

What other plugins or tools can I add in my current workflow?

Here is the thing I'm working on a big project and here the things I have done

I'm using antigravity CLI + IDE + codex

I have created a whole documentation using obsidian and I have created skills like code-traversal and I have created a context.md file and store all the context there and created a skill called context-loader which loads the context

Also api-docs-verify and many more and I'm also using ponytail + caveman

Here is the thing this architecture is very efficient but here is my workflow

I plan a feature with antigravity CLI and then build it with the IDE and review it with codex

Also I have created a brain which remembers things like how it solved that one issue if something similar to that happened it will find it in the brain to solve it

But here is the thing can I make it even further can I improve it more by adding more tools to save the token even more ? Or improve the workflow

reddit.com
u/Taki_7980 — 27 days ago
▲ 2 r/grief

So my girlfriend's previous one sided guy died and since then she's acting all wierd should I be worried

So long story short I have known her for the past 7 years we recently got into a relationship and it's going great to be honest she is my first girlfriend and previously she had a crush on a guy that guy never gave her a chance but she liked him a lot , recently she heard the news that the dude died (she told me about him so I knew) and she was upset when I asked her "are you ok" she replied "do I look ok to you" since then she's acting distant.. i understand someone died it's painful but I don't know I feel this unease feeling i cannot describe what should I do

reddit.com
u/Taki_7980 — 2 months ago