Skip to main content
Skip to main content

Humans and Agents: Collaboration Patterns from IDE to Pull Request

Β· 13 min read
David Sanchez
David Sanchez

The Collaboration Is Already Happening β€” The Question Is Whether It's Structured​

If DevOps foundations prepare the system and the evolution of the Software Engineer reframes the role, the next logical question is this:

How do humans and agents actually collaborate in practice?

Not in theory. Not in demos. Not in marketing videos.

But in real repositories, real IDEs, real pull requests, and real production systems.

Humans and Agents

Agentic software engineering is not about autonomous code generation in isolation. It is about structured collaboration between humans and non-human contributors. And that collaboration happens primarily in two places:

  1. Inside the IDE where intent is explored and shaped
  2. Inside the Pull Request where intent is formalized and governed

These are not just tools. They are the new collaboration surfaces of modern software engineering, and understanding how to use each one effectively is the difference between teams that ship with confidence and teams that ship with anxiety.


The IDE: Where Intent Is Formed (and Refined)​

The IDE is no longer just a code editor. It has become a conversational workspace a place where engineers think out loud with an AI partner.

With AI copilots and agentic capabilities integrated directly into development environments like VS Code and GitHub Copilot, engineers increasingly:

  • πŸ’¬ Refine intent through prompts and inline guidance: "Make this function handle null inputs gracefully" is more than a comment; it's a design decision expressed conversationally
  • πŸ”„ Iterate on design decisions interactively: exploring multiple implementation approaches before committing to one
  • πŸ—ΊοΈ Explore implementation options: asking "What are three different ways to implement this caching strategy?" and evaluating tradeoffs in real time
  • πŸ—οΈ Generate scaffolding, tests, and documentation on demand: reducing time-to-first-iteration from hours to minutes

The IDE Collaboration Loop​

The most effective engineers follow a tight feedback loop inside the IDE:

Define Intent β†’ Generate β†’ Evaluate β†’ Refine β†’ Accept or Reject β†’ Repeat

This loop is fast, iterative, and low-risk. You can experiment, reject suggestions, refine constraints, and clarify intent, all without affecting anyone else. The collaboration is tight-loop and immediate.

What Makes IDE Collaboration Effective​

Not all IDE interactions are equally productive. Here's what separates high-value collaboration from noisy generation:

High-Value PatternLow-Value Pattern
Providing context: "This service uses the repository pattern with dependency injection"Vague prompts: "Write me some code"
Specifying constraints: "Must handle concurrent access and retry on transient failures"No constraints: AI guesses at requirements
Iterating on output: "Good structure, but use async/await instead of callbacks"Accepting first output without review
Using workspace context: referencing existing interfaces and patternsIgnoring existing codebase conventions
Breaking complex tasks into stepsAsking for an entire feature in one prompt

The Critical Boundary: IDE Is Not the System of Record​

Here is the key distinction that mature teams understand:

The IDE is where exploration happens. It is not where governance happens.

No matter how productive the IDE conversation is, it produces a draft. That draft must pass through a structured review process before it becomes part of your system.

This is why the Pull Request exists, and why it matters more than ever.


The Pull Request: Where Intent Is Formalized​

If the IDE is where intent is explored, the Pull Request (PR) is where intent is formalized.

In traditional development, PRs were primarily about:

  • Code review and quality assurance
  • Knowledge sharing across the team
  • Creating a historical record of changes

In an agentic world, PRs become something more fundamental:

The contract between humans and agents.

A PR answers critical questions that no IDE session can:

QuestionWhy It Matters
What changed?Diff visibility and blast radius assessment
Why did it change?Intent documentation for future maintainers
Who (or what) initiated it?Accountability and audit trail
Under what constraints?Policy compliance and security validation
With which validations?Automated checks that gate quality
What's the rollback plan?Risk management for production systems

Without a structured PR process, agentic contributions become opaque and risky. With it, they become auditable, governable, and trustworthy.


Designing PRs for Human–Agent Collaboration​

If agents are going to participate meaningfully in software delivery, PR design must evolve beyond traditional code review.

1. Smaller, Deterministic Changes​

Large, sweeping modifications increase cognitive load and risk. Agent-generated changes should be scoped narrowly:

  • βœ… Single responsibility per PR: one logical change, one review context
  • βœ… Clear linkage to issues or specifications: every PR should answer "why does this exist?"
  • βœ… Predictable diffs: reviewers should be able to understand the change in minutes, not hours
  • βœ… Incremental delivery: ship a series of small, safe changes rather than one monolithic PR

Why this matters for agents: When GitHub Copilot coding agent generates a PR, a focused scope makes it dramatically easier for human reviewers to assess correctness, spot edge cases, and approve with confidence.

2. Explicit Intent in Descriptions​

PR descriptions should not be an afterthought. They are the narrative bridge between intent and implementation.

A well-structured PR description for agent-generated changes should include:

## Problem Statement
What issue or requirement does this address?

## Approach
How was the solution designed? What alternatives were considered?

## Changes Made
- File-by-file summary of what changed and why

## Risk Assessment
- What could go wrong?
- What areas need careful review?

## Validation
- Tests added or modified
- Manual testing performed
- Edge cases considered

## Generated By
- Agent: GitHub Copilot coding agent
- Human review: [Required / In Progress / Complete]

Agents can help draft these descriptions, but humans must validate them. The description is as important as the code itself.

3. Machine-Readable Signals​

As systems mature, PRs should include structured metadata that enables automation without removing oversight:

  • 🏷️ Labels indicating agent-generated content (e.g., agent-generated, copilot-pr)
  • πŸ”— Linked requirements or work items connecting to the original intent
  • 🚦 Environment or policy gates that must pass before merge
  • πŸ“Š Confidence signals from agents (when available) indicating certainty levels
  • πŸ” Review checklists customized for the type of change

This metadata enables teams to build dashboards, track agent contribution patterns, and continuously improve their collaboration workflows.


The Two-Speed Collaboration Model​

Human–agent collaboration operates at two fundamentally different speeds, and both are necessary:

Speed 1: IDE Velocity πŸŽοΈβ€‹

  • Rapid iteration and experimentation
  • Conversational refinement of ideas
  • Exploratory implementation and prototyping
  • Low-risk, high-frequency feedback loops
  • Optimized for flow and creativity

Speed 2: PR Governance πŸ›‘οΈβ€‹

  • Structured review with multiple perspectives
  • Automated validation (tests, security, linting, compliance)
  • Policy enforcement and approval workflows
  • Explicit decision points with clear accountability
  • Optimized for trust and safety

High-performing teams embrace both speeds simultaneously.

They optimize the IDE for flow, removing friction, providing rich context, and enabling rapid iteration.

They optimize the PR for trust, enforcing quality gates, requiring meaningful review, and maintaining clear accountability.

Confusing the two leads to predictable failures:

MistakeConsequence
Applying governance friction inside the IDEEngineers lose flow state and productivity drops
Skipping PR governance for "quick" changesSilent regressions, security drift, untraceable modifications
Treating PR review as optional for agent outputDistributed risk and eroding trust
Moving too slowly in IDEsTeams abandon AI tools due to perceived friction

Human-in-the-Loop Is an Architectural Decision​

There is a temptation to measure success by how little human involvement remains. This is a mistake.

Human-in-the-loop is not a failure of autonomy. It is a feature of responsible systems.

The most effective agentic systems explicitly define boundaries between autonomous and supervised behavior:

Autonomy Spectrum​

Full Autonomy ←————————————————————————→ Full Human Control
| | |
Auto-merge Review Required Manual Only
dependency for business for production
updates logic changes deployments

Engineers should explicitly define:

DecisionExample Policy
When autonomy is allowedDependency updates, formatting fixes, documentation typos
When review is requiredNew features, bug fixes, API changes, configuration updates
When human approval is mandatoryProduction deployments, security-sensitive changes, breaking API changes
What security checks are non-negotiableSecret scanning, SAST analysis, license compliance

Branch protection rules, required status checks, and environment approvals are not bureaucratic friction. They are guardrails that allow autonomy to scale safely.


Identity and Accountability: Who Did What?​

One of the most important shifts in agentic collaboration is identity clarity. When agents contribute to your codebase, the system must answer definitively:

  • πŸ†” Who authorized this change? The human who triggered or approved the agent's work
  • πŸ”‘ What permissions did the agent have? Scoped access following least-privilege principles
  • πŸ“‹ Under what policy? Which rules and constraints governed the agent's behavior
  • πŸ”’ With what level of privilege? Read vs. write vs. admin access to different resources

Why Identity Matters​

Ambiguity in identity erodes trust systemically. If your team can't distinguish between:

  • A PR opened by an engineer
  • A PR opened by an agent on behalf of an engineer
  • A PR opened by an agent autonomously

...then your audit trail is compromised, your accountability model is broken, and your security posture has a gap.

Practical Identity Patterns​

PatternImplementation
Distinct agent identitiesAgents operate under their own GitHub identity (e.g., copilot[bot])
Clear attributionPR descriptions and commit messages indicate both the agent and the authorizing human
Scoped permissionsAgents use fine-grained GitHub tokens with minimal required access
Audit loggingAll agent actions are logged and queryable

Accountability does not disappear when agents participate. It becomes more structural.


What Breaks When PR Discipline Weakens​

Removing or weakening PR discipline in an agentic environment introduces predictable failure modes that compound over time:

Failure ModeHow It HappensImpact
Silent regressionsAgent changes that pass CI but break edge cases in productionCustomer-facing bugs that are hard to trace
Security driftVulnerable patterns introduced without security reviewExpanding attack surface
Untraceable changesNo record of why something changedImpossible to debug, audit, or roll back effectively
Escalating blast radiusSmall unreviewed changes that cascade into systemic issuesOutages that affect multiple services
Knowledge gapsTeam doesn't understand code that agents wroteInability to maintain or extend the system

Autonomy without review is not innovation. It is distributed risk.

If agents can modify production systems without passing through a visible, governed checkpoint, the system is fundamentally misaligned.


Real-World Collaboration Patterns​

Let's look at concrete examples of how these patterns play out in practice:

Pattern 1: Agent-Assisted Feature Development​

1. Engineer creates a detailed GitHub Issue with acceptance criteria
2. GitHub Copilot coding agent picks up the issue and opens a draft PR
3. CI/CD pipeline runs automatically (tests, security scans, linting)
4. Engineer reviews the PR:
- Validates architectural alignment
- Checks business logic correctness
- Requests changes if needed (agent iterates)
5. Required reviewers approve
6. PR merges after all status checks pass
7. Deployment follows progressive rollout strategy

Pattern 2: Automated Dependency Updates​

1. Dependabot detects outdated or vulnerable dependency
2. Opens a PR with version bump and changelog
3. CI runs full test suite
4. If tests pass and change is low-risk β†’ auto-merge enabled
5. If tests fail or change is major β†’ human review required
6. Security team notified for critical CVEs

Pattern 3: IDE-to-PR Workflow​

1. Engineer explores implementation in VS Code with GitHub Copilot
2. Iterates on approach: generates, evaluates, refines
3. Creates well-structured branch with atomic commits
4. Opens PR with clear description linking to requirements
5. Labels PR appropriately (e.g., agent-assisted, feature, needs-review)
6. Automated checks validate quality gates
7. Peer review focuses on intent and architecture, not syntax

Practical Recommendations for Teams​

For teams introducing or maturing agentic capabilities, here are actionable steps:

Governance​

  1. βœ… Keep PRs mandatory for all non-trivial changes, no exceptions for agent-generated code
  2. βœ… Enforce automated checks consistently, tests, security scans, linting, and compliance
  3. βœ… Use clear labeling for agent-generated contributions, transparency builds trust
  4. βœ… Maintain strict branch protection for critical branches, main and production should be immutable without review

Tooling​

  1. βœ… Configure CODEOWNERS to ensure domain experts review changes in their areas
  2. βœ… Set up GitHub Environments with appropriate approval gates for each deployment target
  3. βœ… Enable GitHub Advanced Security for comprehensive scanning on every PR
  4. βœ… Use GitHub Actions to automate the full validation lifecycle

Culture​

  1. βœ… Ensure identities used by agents follow least-privilege principles
  2. βœ… Invest in clear documentation and repository structure to reduce ambiguity for both humans and agents
  3. βœ… Review agent PRs with the same rigor as human PRs, the standard is the standard
  4. βœ… Normalize giving feedback to AI outputs, treating suggestions as drafts, not truths

Beyond the PR: The Cultural Shift​

Ultimately, collaboration between humans and agents is not just a technical challenge. It is a cultural transformation.

Teams must normalize:

  • πŸ” Reviewing code written by non-humans with the same critical eye applied to human-written code
  • πŸ’¬ Giving feedback to prompts and configurations improving how agents are directed, not just what they produce
  • πŸ“ Treating agent outputs as drafts, not truths AI is confident even when wrong
  • 🀝 Sharing patterns and prompt strategies like sharing code snippets, but for human-agent collaboration
  • πŸ“Š Measuring collaboration effectiveness tracking agent contribution quality, review times, and incident rates

The most mature teams will not ask:

"Did a human or an agent write this?"

They will ask:

"Does this meet our standards?"

That mindset shift is foundational. When quality is the benchmark rather than authorship, teams unlock the full potential of human–agent collaboration.


The Three Pillars Working Together​

This post completes a three-part series on agentic software engineering:

PostFocusKey Insight
Agentic DevOps FoundationsSystemsStrong DevOps practices are prerequisites, not afterthoughts
Evolution of the Software EngineerPeopleEngineers evolve from code authors to system designers and orchestrators
Humans and Agents (this post)CollaborationStructured collaboration surfaces (IDE + PR) determine success or failure

Together, they describe a model where:

  • The IDE becomes a collaborative thinking space
  • The Pull Request becomes a formal contract
  • The pipeline becomes a validation engine
  • The engineer becomes an orchestrator of intent

Closing Thoughts​

Agentic software engineering is not about removing humans from the loop.

It is about redefining where humans add the most value.

Humans bring judgment, context, ethics, and accountability. Agents bring speed, consistency, breadth, and tirelessness. The magic happens when both operate in their areas of strength, connected by structured collaboration patterns that preserve trust.

Humans and agents are not competitors. They are collaborators operating at different layers of the system, aligned by intent, constrained by policy, and unified by accountability.

The teams that master this collaboration model will not just ship faster. They will ship better, with more confidence, more security, and more innovation than either humans or agents could achieve alone.

Ask me about my website

Powered by Azure OpenAI

πŸ‘‹ Hello Friend!

You can ask me about:

  • Blog posts or technical articles.
  • Projects and contributions.
  • Speaking topics and presentations
  • Tech behind the website.