Interview guides · Cognition
Cognition Software Engineer Interview Guide
Cognition Software Engineer interview guide: reported rounds, questions and how candidates describe the process.
The 60-second brief
A Software Engineer at Cognition does not just write code; they build the future of human-computer collaboration. As an applied AI lab, Cognition is the creator of Devin, the world’s first fully autonomous AI software engineer, and Windsurf, the first AI-native IDE. In this role, you will work on the bleeding edge of AI reasoning, developer tools, and agentic workflows, solving challenges that directly impact how software is built globally. The engineering team at Cognition is small, highly collaborative, and exceptionally talent-dense. It is composed of world-class competitive programmers, former founders, and industry leaders from pioneering technology and AI companies. Because the team is lean, every engineer enjoys immense autonomy and carries significant responsibility.
This guide is scoped to a Software Engineer candidate at Cognition.
Focus areas
- C#
- ASP.NET MVC
- SOAP / Web Services
The Cognition interview process
Cognition candidates report 3 rounds over 3-5 weeks. The stages below are what candidates describe, not a published process.
Initial Technical Screen
Begin with a technical screen or informational conversation, which may include a timed coding challenge.
What to demonstrate
- Begin with a technical screen or informational conversation, which may include a timed coding challenge
- Depth in C#
How to prepare
- Answer aloud and timed: Implement a parser for a custom configuration format using a provided set of syntax rules.
- Answer aloud and timed: Write a program to resolve dependencies in a package manager, handling circular dependencies gracefully.
Intensive Technical Interviews
Progress to a series of deep-dive technical interviews covering system design, algorithmic problem-solving, and hands-on coding.
What to demonstrate
- Progress to a series of deep-dive technical interviews covering system design, algorithmic problem-solving, and hands-on coding
- Depth in C#
How to prepare
- Answer aloud and timed: Debug a multi-threaded application where race conditions are causing intermittent failures.
- Answer aloud and timed: Implement an algorithm to optimize file-system traversal, balancing memory usage and execution speed.
Team Conversations
Participate in conversations with various team members, assessing communication, humility, and alignment with company culture.
What to demonstrate
- Participate in conversations with various team members, assessing communication, humility, and alignment with company culture
- Depth in C#
How to prepare
- Answer aloud and timed: Build a utility that translates API payloads between two different schema versions based on a dynamic mapping document.
- Answer aloud and timed: Design the backend architecture for an AI-native IDE that requires real-time synchronization of file states and terminal outputs.
Where candidates lose points
Master Documentation Reading
During coding tests that use unfamiliar frameworks or languages, do not panic. Treat the test as an open-book exercise. Your ability to quickly search, read, and apply documentation is exactly what is being evaluated.
Do not spend too much time trying to memorize syntax during the adaptive coding tests
Focus on understanding the core logic of the problem and use the provided documentation as a tool to handle the syntax details.
Leave Your Ego at the Door
Cognition places a massive premium on maturity and collaboration. If you enter the marathon team interviews with a rigid set of opinions or an defensive attitude toward feedback, you will not pass. Be receptive, open-minded, and collaborative.
Questions & practice
Implement a parser for a custom configuration format using a provided set of syntax rules.
Medium · Coding & Adaptability
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Write a program to resolve dependencies in a package manager, handling circular dependencies gracefully.
Medium · Coding & Adaptability
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Implement an algorithm to optimize file-system traversal, balancing memory usage and execution speed.
Medium · Coding & Adaptability
Approach
- Say what the runtime actually does before reasoning about the code.
- Name what is shared across threads and what owns each piece of state.
- Identify the window where an invariant is briefly untrue.
- Distinguish a value from a reference to it, and say which one you handed out.
Follow-up
- What happens if two callers reach this at the same time?
- Where could this allocate more than you expect?
Replace offset paging on the resource feed with keyset
Easy · keyset pagination · composite index · sort order
resource holds resource_id, tenant_id, owner_user_id, title, body_ref, version, status ('draft','active','archived','deleted'), created_at, updated_at, deleted_at, with an index on (tenant_id, status, updated_at DESC, resource_id DESC). The listing endpoint returns active resources for one tenant, newest update first, 50 per page, today with LIMIT 50 OFFSET n. Tenants reach page 400 and rows are created while they read. Write the keyset query, define what the cursor carries and how it is encoded, and say which part of the index each predicate uses. Assume PostgreSQL 16.
Approach
- Name the two failures separately. OFFSET 20000 makes the server produce and discard 20,000 rows, so page cost grows with depth rather than with page size. Independently, any write that changes how many rows sort above the offset moves the window between two fetches, and the direction decides which anomaly you get: an insert lands at the head of updated_at DESC and pushes already-returned rows down past the boundary, so they are returned a second time; a delete above the offset, or a row whose updated_at is bumped above the cursor, pulls rows up and one is never returned at all. Nothing in the response reveals either.
- Write the seek: WHERE tenant_id = $1 AND status = 'active' AND (updated_at, resource_id) < ($2, $3) ORDER BY updated_at DESC, resource_id DESC LIMIT 50. The row-value comparison is one index range rather than a disjunction, and both columns are NOT NULL, which is what makes that comparison well defined.
- Map each predicate onto the index: tenant_id and status are equality on the leading columns, (updated_at, resource_id) is the range, and the ORDER BY matches the index order so no Sort node appears and the scan stops after 50 rows. The DESC in the definition only matters for mixed directions — a plain ascending btree on the same columns is read backwards for this query.
- Put both sort columns in the cursor and nothing the client can tamper with into another tenant: base64 of (updated_at, resource_id), validated server-side, with tenant_id taken from the principal.
Follow-up
- The client asks for 'jump to page 400'. What do you offer instead, and what does the honest version cost?
- Sort order becomes user-selectable across four columns. How many indexes is that, and which would you refuse to add?
Denormalise tenant onto revisions and backfill it live
Hard · denormalisation · online migration · backfill
resource_revision (revision_id, resource_id, version, actor_user_id, change_kind, patch, request_id, created_at) has 400M rows and no tenant column; tenant_id lives only on resource. Two reads need it: a tenant-scoped audit feed ordered by created_at DESC, and an offboarding purge. Both join back to resource today. Justify adding tenant_id to resource_revision against those two reads, name the anomaly the copy introduces and the constraint that prevents it, then give the ordered migration for a live table taking 1.2k writes/second — the lock each step takes, how the backfill is batched, and where each step stops being reversible. PostgreSQL 16.
Approach
- Justify from the access path rather than from taste. Without the column, the audit feed either scans resource_revision by created_at and discards other tenants' rows, or resolves the tenant's resource_ids first and probes with them — both proportional to the tenant's whole history rather than to one page. With (tenant_id, created_at DESC, revision_id DESC) it is a seek that stops at 50 rows, and the purge becomes a ranged delete instead of a join.
- Name the cost exactly: a second copy of a fact can disagree with the first. Make the disagreement unwritable rather than documented — add UNIQUE (resource_id, tenant_id) on resource so it can serve as a foreign-key target, then FOREIGN KEY (resource_id, tenant_id) REFERENCES resource (resource_id, tenant_id) on the revision table. A revision can then only ever carry its parent's tenant.
- Step one, expand: ALTER TABLE resource_revision ADD COLUMN tenant_id BIGINT NULL, with no default, so it is a catalogue change and no rewrite. It still needs ACCESS EXCLUSIVE for an instant, and that instant queues behind the longest open transaction on the table while every later query queues behind it — set lock_timeout to 2s and retry rather than wait.
- Step two, dual-write: deploy the writer that populates tenant_id on every new revision while reads still use the join. Reversible by redeploying the previous build, because nothing reads the column yet.
Follow-up
- The backfill is half finished and a rollback is required. What state is the table in, and what does the previous build do with a half-populated column?
- How do you verify the backfill actually finished, given rows are still being inserted while it runs?
Build a utility that translates API payloads between two different schema versions based on a dynamic mapping
Medium · Coding & Adaptability
Build a utility that translates API payloads between two different schema versions based on a dynamic mapping document.
Approach
- Say who the caller is and what they do when the call fails halfway.
- Define the identity of a request so a retry cannot double-apply it.
- Separate accepted, pending, failed and confirmed; they are different facts.
- Design the error taxonomy before the success shape; callers branch on it.
Follow-up
- What happens if the caller retries after a timeout?
- How does a client discover it is on an old version of this contract?
Design the backend architecture for an AI-native IDE that requires real-time synchronization of file states an
Medium · System Design & Architecture
Design the backend architecture for an AI-native IDE that requires real-time synchronization of file states and terminal outputs.
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
How would you architect a secure, isolated sandbox environment for executing untrusted code generated by an AI
Medium · System Design & Architecture
How would you architect a secure, isolated sandbox environment for executing untrusted code generated by an AI agent?
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Design a rate-limiting and queuing system for an API that experiences highly variable, bursty traffic from ent
Medium · System Design & Architecture
Design a rate-limiting and queuing system for an API that experiences highly variable, bursty traffic from enterprise customers.
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
How would you design an integration layer that connects a proprietary AI agent with a client's legacy database
Medium · System Design & Architecture
How would you design an integration layer that connects a proprietary AI agent with a client's legacy database and internal APIs?
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
How do you balance the trade-off between shipping quickly to gather user feedback and spending time on archite
Medium · Behavioral & Alignment
How do you balance the trade-off between shipping quickly to gather user feedback and spending time on architectural polish?
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Debug a multi-threaded application where race conditions are causing intermittent failures.
Medium · Coding & Adaptability
Approach
- Establish what changed and when, before forming any theory.
- Pick a bisection that eliminates candidates whichever way it turns out.
- Check the instrumentation before believing the symptom.
- Separate the trigger from the cause; the deploy is rarely the bug.
Follow-up
- What would you look at first, and what would it rule out?
- How would you tell a cause from a coincidence here?
Describe how you would monitor, log, and debug distributed executions of long-running autonomous workflows.
Medium · System Design & Architecture
Approach
- Establish what changed and when, before forming any theory.
- Pick a bisection that eliminates candidates whichever way it turns out.
- Check the instrumentation before believing the symptom.
- Separate the trigger from the cause; the deploy is rarely the bug.
Follow-up
- What would you look at first, and what would it rule out?
- How would you tell a cause from a coincidence here?
Suggested practice checklist
Built from the rounds and topics Cognition candidates report.
Day 1 — Map the Cognition loop
- Write out the reported sequence: Initial Technical Screen, Intensive Technical Interviews, Team Conversations.
- For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.
Deliverable: A one-page map of the 3 reported rounds, with the weakest marked.
Day 2 — Work C#
- Spend the session on C#, which Cognition candidates report being tested on.
- Write one worked example in C# and time yourself on it.
Deliverable: One timed worked example in C#.
Day 3 — Work ASP.NET MVC
- Spend the session on ASP.NET MVC, which Cognition candidates report being tested on.
- Write one worked example in ASP.NET MVC and time yourself on it.
Deliverable: One timed worked example in ASP.NET MVC.
Day 4 — Work SOAP / Web Services
- Spend the session on SOAP / Web Services, which Cognition candidates report being tested on.
- Write one worked example in SOAP / Web Services and time yourself on it.
Deliverable: One timed worked example in SOAP / Web Services.
Day 5 — Answer out loud: Coding & Adaptability
- Answer aloud, timed: Implement a parser for a custom configuration format using a provided set of syntax rules.
- Answer aloud, timed: Write a program to resolve dependencies in a package manager, handling circular dependencies gracefully.
Deliverable: Spoken answers to 2 reported Coding & Adaptability question(s), under time.
Day 6 — Answer out loud: System Design & Architecture
- Answer aloud, timed: Design the backend architecture for an AI-native IDE that requires real-time synchronization of file states and terminal outputs.
- Answer aloud, timed: How would you architect a secure, isolated sandbox environment for executing untrusted code generated by an AI agent?
Deliverable: Spoken answers to 2 reported System Design & Architecture question(s), under time.
Day 7 — Answer out loud: Behavioral & Alignment
- Answer aloud, timed: Tell me about a time you had to deliver a highly critical feature with minimal requirements and a tight deadline. How did you decide what to build?
- Answer aloud, timed: Describe a situation where you had a strong disagreement with a teammate over an architectural decision. How did you resolve it?
Deliverable: Spoken answers to 2 reported Behavioral & Alignment question(s), under time.
Behavioural preparation
Behavioural rounds judge the decision you made and what it cost.
Tell me about a time you had to deliver a highly critical feature with minimal requirements and a tight deadli
Medium · Behavioral & Alignment
Tell me about a time you had to deliver a highly critical feature with minimal requirements and a tight deadline. How did you decide what to build?
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?
Describe a situation where you had a strong disagreement with a teammate over an architectural decision. How d
Medium · Behavioral & Alignment
Describe a situation where you had a strong disagreement with a teammate over an architectural decision. How did you resolve it?
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?
Talk about a project you owned from end to end. What was the impact, and what would you do differently today?
Medium · Behavioral & Alignment
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?
Tell me about a complex technical problem you solved that was outside of your comfort zone. How did you ramp u
Medium · Behavioral & Alignment
Tell me about a complex technical problem you solved that was outside of your comfort zone. How did you ramp up?
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?