Skip to content

[codex] make AGY bootstrap prompt order configurable#263

Merged
lidge-jun merged 2 commits into
lidge-jun:mainfrom
GSL-R:fix/agy-configurable-prompt-order
Jul 3, 2026
Merged

[codex] make AGY bootstrap prompt order configurable#263
lidge-jun merged 2 commits into
lidge-jun:mainfrom
GSL-R:fix/agy-configurable-prompt-order

Conversation

@GSL-R

@GSL-R GSL-R commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What changed

  • adds task-first / context-first ordering to the AGY bootstrap envelope
  • keeps the bootstrap sentinel first in both modes
  • reads the existing per-CLI promptOrder setting when spawning AGY
  • preserves the current task-first behavior as the default

Why

AGY is invoked through a stateless print adapter, so some installations need the stable operational instructions before recent history and the current task to reduce provider-default behavior after compaction or session recreation. Other installations prefer the current task first. Making the ordering explicit avoids hard-coding one tradeoff for every AGY user.

Example:

{
  "cli": {
    "agy": {
      "promptOrder": "context-first"
    }
  }
}

The bootstrap sentinel remains the first segment, and required task content remains protected by the existing spill budget logic.

Validation

  • npx tsc --noEmit
  • npx tsx --experimental-test-module-mocks --test tests/unit/agy-bootstrap.test.ts tests/unit/steer-flow.test.ts
  • 21 focused tests passed
  • the equivalent context-first behavior has been operated in the fork for more than 72 hours without the previous repeated environment rediscovery pattern

@GSL-R
GSL-R marked this pull request as ready for review July 1, 2026 12:18
@lidge-jun
lidge-jun merged commit d86e63b into lidge-jun:main Jul 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants