fix: increase headless new-milestone timeout and limit investigation scope (#1230)
Two issues with headless new-milestone: 1. Default 300s timeout is too short — codebase investigation + artifact writing for a new milestone regularly exceeds 5 minutes. Bumped to 600s (10 min) when the default hasn't been explicitly overridden. 2. The discuss-headless prompt's 'Investigate' step had no guidance on how much time to spend scouting. LLMs would exhaustively explore the codebase (50+ tool calls) before writing any artifacts, running out of time. Added 'brief' qualifier and 5-6 tool call budget with a note that the research phase does deeper investigation later. The commit_docs: false preference is already respected — the prompt correctly says 'Do not commit' when commit_docs is false, and ensureGitignore idempotently skips when .gsd/ is already in .gitignore. Fixes #1227
This commit is contained in:
parent
8c1f98bc3f
commit
99fdaa6ad8
2 changed files with 9 additions and 2 deletions
|
|
@ -178,6 +178,11 @@ async function runHeadlessOnce(options: HeadlessOptions, restartCount: number):
|
|||
const startTime = Date.now()
|
||||
const isNewMilestone = options.command === 'new-milestone'
|
||||
|
||||
// new-milestone involves codebase investigation + artifact writing — needs more time
|
||||
if (isNewMilestone && options.timeout === 300_000) {
|
||||
options.timeout = 600_000 // 10 minutes
|
||||
}
|
||||
|
||||
// Supervised mode cannot share stdin with --context -
|
||||
if (options.supervised && options.context === '-') {
|
||||
process.stderr.write('[headless] Error: --supervised cannot be used with --context - (both require stdin)\n')
|
||||
|
|
|
|||
|
|
@ -16,13 +16,15 @@ Summarize your understanding of the specification concretely:
|
|||
- Scope estimate (how many milestones × slices)
|
||||
- Any ambiguities or gaps you notice
|
||||
|
||||
### Step 2: Investigate
|
||||
### Step 2: Investigate (brief)
|
||||
|
||||
Scout the codebase to understand what already exists:
|
||||
Quickly scout the codebase to understand what already exists — spend no more than 5-6 tool calls here:
|
||||
- `ls` the project root and key directories
|
||||
- Search for relevant existing code, patterns, dependencies
|
||||
- Check library docs if needed (`resolve_library` / `get_library_docs`)
|
||||
|
||||
Then move on to writing artifacts. Do not explore exhaustively — the research phase will do deeper investigation later.
|
||||
|
||||
### Step 3: Make Decisions
|
||||
|
||||
For any ambiguities or gaps in the specification:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue