Introduction

Code sessions are useful for feature development. They allow you to generate new code, modify existing code, and optimize your codebase with the help of an AI agent.

Code Session

Format

The general format of a code session is as follows:

  1. Task Definition: You provide the agent with a small feature to implement.
  2. Implementation: The agent works on implementing the feature. It will begin by cloning the repository to the cloud, and then proceed to work on the feature. It may analyze existing code, write new code, modify existing code, and run tests.
  3. Pull Request Creation: Once the implementation is complete, the agent creates a pull request with its changes.

Code Session Pull Request

Parallel Sessions

A great way to maximize productivity with code sessions is to launch multiple sessions in parallel.

Launching sessions in parallel allows you to:

  1. Work on different features or components simultaneously.
  2. Compare different implementation strategies for the same task.
  3. Tackle complex projects by breaking them down into smaller, concurrent tasks.

By running parallel sessions, you can leverage the AI’s capabilities to explore various solutions or make progress on multiple fronts at once, significantly accelerating your development process.

Getting Started

There are two ways to initiate a code session. The easiest way is to use our GitHub integration on an open issue. If you want more control over the session settings, you can initiate a session from the dashboard instead.

GitHub Integration

If you have a GitHub issue open, you can use our GitHub integration to start a code session.

  1. Click on the GitHub integration button on the issue.
  2. Ping @honeycombsh solve in the issue to begin solving the issue.

There is no autocomplete on @honeycombsh, so you will have to type it out in full.

Once the agent has picked up the issue, it will start working on it:

Agent Picking Up Issue

When it is finished, the agent will update its own comment with a link to its pull request.

Dashboard

To start a new coding session:

  1. Click on the Sessions tab
  2. Click on the ‘Begin New’ button.
  3. Click on the ‘Code’ card.
  4. Fill out the repository, branch, and commit you want the agent to work on.
  5. Choose one of the available setup options:
    • None: Skip the setup process.
    • Agentic: Provide natural language instructions for the agent to set up the environment.
    • Programmatic: Provide exact commands for the agent to set up the environment.
  6. Choose one of the available testing options:
    • None: Skip the testing process.
    • Agentic: Provide natural language instructions for the agent to set up and run tests.
  7. Final configuration:
    • Time Limit: Choose a time limit for the session.
    • Instructions: Provide the main description of the task you want the agent to perform.
    • Issue URL (optional): If you have a link to an issue, you can provide it here, and the agent will use it to get more context about the task.

To get you started, a good set of options to choose by default is “None” for setup, “None” for testing, and a 1 hour time limit. Configuring setup, testing, and larger time limits is great for more complex tasks.

Prompting Best Practices

To get the most out of your code sessions, consider the following prompting advice:

  1. Be Specific: Provide as much detail as possible about the task you want the agent to perform. The more specific you are, the better the agent can understand and execute your request.

  2. Include File Paths: Whenever possible, include the exact file paths where you want changes to be made. This helps the agent navigate your codebase more efficiently.

  3. Break Down Complex Tasks: If you have a large or complex task, consider breaking it down into smaller, more manageable subtasks. This can help the agent focus on one aspect at a time.

  4. Provide Context: If your task relates to existing code or functionality, briefly explain the context. This can help the agent understand the bigger picture and make more informed decisions.

  5. Use Clear Language: Avoid ambiguity in your instructions. Use clear, concise language to describe what you want.

  6. Specify Output Format: If you have a preference for how the code should be structured or formatted, mention it in your instructions.

  7. Include Examples: When applicable, provide examples of what you’re looking for. This can be especially helpful for complex algorithms or specific coding patterns.