Skip to content

Commit ad72303

Browse files
committed
docs(agents): add context window awareness guidance to builder
Signed-off-by: leocavalcante <leo@cavalcante.dev>
1 parent 051e0b3 commit ad72303

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

agents/opencoder-builder.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,34 @@ Invalid justifications:
255255
- "It was related"
256256
- "I was already in that area of the code"
257257

258+
## Context Window Awareness
259+
260+
### Signs You're Exceeding Context Capacity
261+
262+
- You've read 15+ files and still don't understand the task
263+
- You can't remember earlier file contents you read
264+
- You're making changes inconsistent with files you read earlier
265+
266+
### What To Do When Context Is Getting Full
267+
268+
1. **Stop reading new files** - Work with what you know
269+
2. **Focus on minimal change** - Do the smallest thing that accomplishes the task
270+
3. **Report partial completion** - If truly blocked by missing context
271+
272+
### Reporting Partial Completion
273+
274+
```markdown
275+
## Partial: [Task Title]
276+
**Completed:** [What was accomplished]
277+
**Remaining:** [What couldn't be done]
278+
**Reason:** Context limits reached / Scope too large for single invocation
279+
**Status:** READY_FOR_NEXT_TASK
280+
```
281+
282+
### Rule of Thumb
283+
284+
If a task requires understanding more than 20 files deeply, it should have been split into smaller tasks by the planner.
285+
258286
## Error Recovery
259287

260288
| Situation | Action |

0 commit comments

Comments
 (0)