Repository navigation
feat(antigravity): auto-chain disposable child orchestrators and thin root supervisor - #129
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<60k–120ktarget,<=2files /<=3calls per turn inline) acrossGEMINI.md,GEMINI-BASE.md,start,start-small, andantigravity-orchestrationby delegating>=3-file diagnostic/architecture Q&A to bounded read-only subagents (<=15cited lines) and spawning a disposableTypeName: "self"Child Orchestrator (350kwindow) for Phases 3½–12 after Phase 3 user plan approval.baton-pass,peer-pipeline-swarm, andautonomous_breaker.pyso310k(Baton Warn),350k(Baton Block), and350k(Subagent Context Cap) auto-chain in the same chat viainvoke_subagent(TypeName="self", Model="inherit")andBATON_CONTINUE: <path>, reserving manual new-chatIngest ...prompts strictly forestimate >= 450000(BATON_HARD_CEILING_TOKENS, near the512kcompaction ceiling) or explicit user requests.+25kACTIVE_CONTEXT.md//tmp/*.mdcleanup unlock (plusswarm{action: "status"|"kill"}and context.mdread exemptions) foris_subagentChild Orchestrators inautonomous_breaker.pyso swarm-owning Child Orchestrators can safelygit fetchsharecommits and kill child workers before returningBATON_CONTINUE.Background
Context
Antigravity sessions run on a
512kcompaction window with circuit-breaker thresholds at310k(BATON_WARN_TOKENS),350k(BATON_BLOCK_TOKENS), and350k(SUBAGENT_TOKEN_CAP). Previously,startandstart-smallran Phases 3½–12 coordination directly inside the Root chat, andbaton-pass/autonomous_breaker.pyinstructed Root at310k/350kto stop and ask the user to open a new chat tab (Session B).The problem
3+codebase files inline during multi-turn Q&A and coordinating multiple/startruns directly inside Root pushed Root past310ktokens across multi-feature chats.310kor350kfired,autonomous_breaker.pyandbaton-passpunted continuation to the user with a manualIngest ...prompt—even though writingACTIVE_CONTEXT.mdalready unlocks+50ktokens, enough to spawn a freshTypeName: "self"Child Orchestrator in the same chat.TypeName: "self"Child Orchestrator ran apeer-pipeline-swarmand hitSUBAGENT_TOKEN_CAP(350k),is_subagentpreviously lacked a+25kACTIVE_CONTEXT.mdcleanup unlock andswarm{action: "status"|"kill"}exemption to anchorshare-workspace commits before tearing down child workers.The fix
autonomous_breaker.py):is_subagenthelpers a one-time, non-ratcheting+25ktoken cleanup unlock upon writingACTIVE_CONTEXT.mdor temp/brain.mdfiles (while rejecting symlinked parent directories anddocs/plans/*.mdas unlock triggers) and exemptsswarm{action: "status"|"kill"}, board/task cleanup tools, andACTIVE_CONTEXT.md//tmp/*.mdreads so Child Orchestrators can anchorshareSHAs, kill workers, and returnBATON_CONTINUE: <path>.Baton Warn(310k–350k) andBaton Block(350k–450k) coaching messages to writeACTIVE_CONTEXT.md(+50kunlock), clean up Root-owned swarm workers, and immediately spawninvoke_subagent(TypeName="self", Model="inherit")in the same chat.BATON_HARD_CEILING_TOKENS(450000default): once Root reaches>=450k, blocks new subagent/swarm spawns even when unlocked and coaches Root to finalizeACTIVE_CONTEXT.mdand emit the manualIngest ...prompt for a fresh chat before hitting512kcompaction.GEMINI.md,GEMINI-BASE.md,baton-pass,start,start-small,antigravity-orchestration,peer-pipeline-swarm):>=3-file Q&A to bounded read-only subagents returning<=15cited lines.>=3-file)/startand/start-smallrun to a disposableTypeName: "self"Child Orchestrator (350kwindow) returning<=15lines, with automaticBATON_CONTINUEchaining in the same chat.Test plan
internal/catalog/antigravity/hooks/test_autonomous_breaker.py(772total Python specs passing):test_subagent_child_orchestrator_active_context_unlocks_plus_25k_and_exempts_swarm_kill_and_context_reads(verifies+25kunlock,git fetchcleanup, non-ratcheting cap past+25k, andswarm status/kill+ context.mdread exemptions)test_root_310k_warn_and_350k_block_coach_same_chat_self_child_orchestrator(verifies310kwarn and350kblock coaching + post-unlock same-chatinvoke_subagentallow)test_root_450k_hard_ceiling_coaches_manual_new_chat_and_blocks_subagent_spawn_even_when_unlocked(verifies>=450kmanual fresh-chat fallback and spawn block even afterACTIVE_CONTEXT.mdunlock)TestAntigravityThinSupervisorPlannerAndManifestCatalogInvariantsininternal/catalog/catalog_test.goto enforceBATON_HARD_CEILING_TOKENS,BATON_CONTINUE, andChild Orchestratorinvariants across embedded catalog files (go test -count=1 ./...passing)test_quick_validate.py) and zero personal/org/path leaks viascripts/sync-antigravity-from-local.shRollback plan
Revert this PR (and run
skill-installer updateon local Antigravity installations).