Skip to content

Increase agent task scope for larger, more complete implementations#95

Merged
hallucinate-llc merged 1 commit into
mainfrom
hallucinate-llc-increase-agent-task-scope
Jun 28, 2026
Merged

Increase agent task scope for larger, more complete implementations#95
hallucinate-llc merged 1 commit into
mainfrom
hallucinate-llc-increase-agent-task-scope

Conversation

@hallucinate-llc

Copy link
Copy Markdown
Collaborator

Motivation

The multi-agent supervisor's implementation daemon consistently produces commits in the 200-300 line range rather than the 1000+ line implementations it should be capable of. After auditing the full invocation chain, the root cause is a combination of prompt-level instructions that explicitly tell the agent to self-limit ("keep changes scoped", "small, reviewable changes") and context starvation that prevents the agent from seeing enough of the codebase to make broad changes.

Approach

Three targeted changes that compound to unlock larger output:

  • Prompt rewrite (implementation_daemon.py): Replaced conservative "keep changes scoped" / "small, reviewable changes" language with instructions to "implement completely and thoroughly", "do not artificially limit scope", and "larger, complete implementations are preferred over minimal patches". The agent now receives explicit permission to touch as many files as needed.

  • Context window expansion (context.py): Increased the number of relevant files from 6 to 16, and per-file char budget from 12KB to 24KB. This gives the agent visibility into ~2.5x more of the codebase so it can confidently modify files it can actually read.

  • Supporting adjustments: Bumped the todo vector context token budget from 260 to 600 tokens for richer task context, and updated the objective graph's goal-packet acceptance text to encourage "one comprehensive pass" rather than "without expanding the prompt".

What's NOT changing

The Codex/Copilot CLI invocations themselves have no explicit token caps -- they're bounded only by the tool's internal limits and the existing 30-minute timeout. The max_new_tokens: 2048 limit only applies to the LLM router (task proposals/refinement), not to the actual implementation CLI calls. So the CLI tools were never the bottleneck -- the prompt was.

…tions

- Remove 'small, reviewable changes' and 'keep changes scoped' language
  from implementation prompt; replace with instructions to implement
  comprehensively and avoid artificial scope limits
- Increase context file budget from 6 to 16 files so the agent can see
  more of the codebase it needs to modify
- Increase per-file context from 12KB to 24KB for deeper understanding
- Increase todo vector context token budget from 260 to 600 tokens
- Update goal packet acceptance text to encourage complete passes
  rather than conservative minimal patches

These changes address the root causes of commits being limited to
~200-300 lines instead of producing 1000+ line implementations:
the prompt was explicitly instructing minimalism, and the agent had
insufficient context visibility (only 6 files) to implement broadly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 28, 2026 01:15
@hallucinate-llc hallucinate-llc merged commit 76ec8b3 into main Jun 28, 2026
5 of 13 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to increase the autonomous agent’s ability to deliver larger, more complete implementations by loosening “small patch” prompt guidance and increasing the amount of code/context surfaced to the agent during task execution.

Changes:

  • Increased the default todo-vector context token budget from 260 to 600.
  • Rewrote the implementation prompt / rules to explicitly encourage comprehensive, multi-file, production-ready implementations in one pass.
  • Expanded default context selection limits (more files, larger per-file char limit) and updated goal-packet acceptance wording to favor comprehensive passes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ipfs_accelerate_py/agent_supervisor/todo_daemon/implementation_daemon.py Increases default vector-context budget and rewrites the implementation agent prompt to encourage broader, complete implementations.
ipfs_accelerate_py/agent_supervisor/todo_daemon/context.py Raises default limits for how many relevant files are selected and how much of each file is included in rendered context.
ipfs_accelerate_py/agent_supervisor/objective_graph.py Adjusts goal-packet acceptance phrasing to encourage a single comprehensive pass.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 91 to 93
DEFAULT_TODO_VECTOR_CONTEXT_TOKEN_BUDGET = int(
os.environ.get("IPFS_ACCELERATE_AGENT_TODO_VECTOR_CONTEXT_TOKEN_BUDGET", "260")
os.environ.get("IPFS_ACCELERATE_AGENT_TODO_VECTOR_CONTEXT_TOKEN_BUDGET", "600")
)
Comment on lines 131 to +135
task_or_title: Any,
allowed_prefixes: Sequence[str] = (),
suffixes: Sequence[str] = DEFAULT_CONTEXT_SUFFIXES,
max_files: int = 6,
max_file_chars: int = 12000,
max_files: int = 16,
max_file_chars: int = 24000,
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.

3 participants