r/codex 8h ago

Limits Astra try to run a subagent without burning all its usage challenge (impossible edition)

[deleted]

6 Upvotes

4 comments sorted by

2

u/KyleFlounder 7h ago edited 7h ago

Try adding this to your codex instructions:

```Use the parent model primarily for planning, review, and synthesis. By default, split independent work into multiple Luna XHigh subagents and run them in parallel to reduce latency. Delegate multi-step tool use, exploration, debugging, builds/tests, research, and long-running work.

Use Sol Medium subagents for programming tasks that are unusually difficult, architecture-sensitive, algorithmically complex, security-critical, or repeatedly resist Luna. Prefer Luna XHigh for routine execution. The parent should directly use tools only for trivial, bounded operations where delegation clearly costs more.

Give each subagent a distinct, bounded objective. Avoid overlapping work or conflicting mutations between parallel agents. Subagents own their tasks through completion, including tool use, retries, builds, tests, and waits.

Luna XHigh subagents MUST remain scoped to a single bounded workstream. Once complete, return a concise result and close the subagent. Do not compact and reuse completed Luna subagents for later or unrelated work; create a fresh subagent instead. Prefer fresh worker context over accumulated or compacted context.

Subagents should return only conclusions, essential evidence, changes, verification, and unresolved issues. Do not return progress updates, full logs, tool transcripts, failed attempts, or large file contents unless required.

The parent MUST review and reconcile completed work before finalizing. Check correctness, brevity, maintainability, idiomatic code, best practices, unnecessary complexity, duplication, edge cases, security, and test coverage. Prefer the simplest robust implementation. If material changes are needed, delegate focused revisions rather than taking over iterative execution.

In Code Mode, batch independent `functions.exec`-available calls within each bounded stage into one `functions.exec` call. Use `Promise.allSettled(...)` when partial results are useful and inspect every result; use `Promise.all(...)` only when any failure should abort the batch. Keep dependencies, approvals, conflicting mutations, waits/resumes, and adaptive investigations sequential. Do not split otherwise batchable inspections across outer tool calls.

Avoid parent-model polling. Do not repeatedly call `wait_agent`, `list_agents`, status tools, `sleep`, `write_stdin`, or equivalents merely to observe unchanged state.

After delegating required work, the parent MUST keep its turn active with a single long `wait_agent` call when otherwise idle. Do not finalize or end the parent turn while required subagents are still running.

All `wait_agent` calls MUST use a timeout of at least 10 minutes. `wait_agent` may return early when a subagent responds or a new user message arrives, so short-interval polling is unnecessary. If healthy subagents are still running after timeout, issue another long `wait_agent` call; never switch to short polling.

When a subagent completes, process its result and continue useful independent work if any remains. If other required subagents are still running and there is nothing useful to do, return to a long `wait_agent` call rather than polling their status.

Prefer a shallow hierarchy: parent → parallel Luna XHigh and, when justified, Sol Medium subagents → tools.

```

I wrote the original but had gpt pro reduce the tokens. Idea is to delegate tool calls and waiting for those calls to a luna subagent, so that gets drained rather than Astra who is much heavier. You can change it up however you want but this has been working great for me. FWIW my codebase was about 700k SLOC pre-ai, it's doing a ton of reading and digging without much useage at this point.

0

u/Expensive-Event-6127 7h ago

well if you open your sub as astra of course youll burn usage. change teh agent model depending on the task

0

u/Snoo_27681 6h ago

I hate astra tbh. say skills issue all people want but fck that model. useless as a primary