{"slug": "monkeycode-under-parallel-tasks-do-the-patches-still-know-their-base-commit", "title": "MonkeyCode Under Parallel Tasks: Do the Patches Still Know Their Base Commit?", "summary": "A developer tested MonkeyCode's parallel coding-agent tasks to determine whether patches identify their base commit, finding that parallel sessions create consistency problems. The experiment showed that silent base substitution is unsafe, while explicit conflicts or rerun requests are acceptable. The developer recommends rejecting runs where drift silently changes the base or cross-task files appear.", "body_md": "Two coding-agent tasks start from commit `A`\n\n. Task X edits authentication. Task Y edits logging. While both run, a human pushes commit `B`\n\n.\n\nIf the patches do not identify their base, “apply both” is unsafe. Parallel agent sessions are a consistency problem, not only a speed feature.\n\nHere is a black-box experiment for [MonkeyCode SaaS](https://monkeycode-ai.net/), not a claim about its concurrency implementation.\n\n`A`\n\n.Build a disposable repository:\n\n```\nsrc/auth.py          tests/test_auth.py\nsrc/logging.py       tests/test_logging.py\nTASK_X_SENTINEL.txt  TASK_Y_SENTINEL.txt\n```\n\nMake both tests fail independently at `A`\n\n.\n\nTask X may edit only auth files; Task Y only logging files. Both are forbidden from changing either sentinel. Record requirement hashes and the full base SHA.\n\nStart both tasks as close together as the workflow permits. While active, push an unrelated documentation commit `B`\n\n.\n\nCapture:\n\n```\ntask_id: \"<id>\"\nrequested_base: \"<A>\"\nreported_or_inferred_base: \"<SHA or unknown>\"\nchanged_files: []\ntest_command: \"<command>\"\ntest_result: \"pass|fail|unknown\"\nresult_revision: \"<SHA or artifact>\"\ndrift_action: \"none|reject|rebase|restart|unknown\"\n```\n\n`unknown`\n\nis honest observation, but may fail your adoption gate.\n\nApply X and Y separately to clean checkouts of `A`\n\n. Check allowed files, focused test, unrelated fixture, and sentinels.\n\nThen evaluate both orders:\n\n```\nA + X + Y\nA + Y + X\n```\n\nRun both tests after each order. If only one order works, the tasks have a dependency that must be represented and reviewed.\n\nNow test `B + X + Y`\n\n. A clean application, explicit conflict, or request to rerun from `B`\n\ncan all be reasonable. Silent base substitution is not.\n\nFinally, create two tasks that deliberately edit the same line. The required property is visible conflict and rerun evidence—not magical automatic merge.\n\n| Observation | Decision |\n|---|---|\n| Bases clear; isolated patches; both orders pass | Candidate |\n| Conflict explicit | Candidate with human merge gate |\n| Base unknown | Insufficient evidence |\n| Cross-task files appear | Reject run |\n| Drift silently changes base | Reject run |\n| Combined patch lacks rerun evidence | Block merge |\n\nMonkeyCode's README documents online managed environments plus task and requirement management, making it a practical candidate for this experiment. It does not promise the envelope or semantics above.\n\nSources: [MonkeyCode repository](https://github.com/chaitin/MonkeyCode) and [SaaS](https://monkeycode-ai.net/).\n\nLimitations: two tasks are not a load test and cannot prove process- or tenant-level isolation.\n\nDisclosure: I'm a MonkeyCode user sharing my own experience, not affiliated with the project. This is one of several independently useful technical articles published by accounts managed by the same operator; it is not an independent endorsement.\n\nWhich event should force a restart from a new base: human commit `B`\n\n, overlapping patches, or either one?", "url": "https://wpnews.pro/news/monkeycode-under-parallel-tasks-do-the-patches-still-know-their-base-commit", "canonical_source": "https://dev.to/robinzzz/monkeycode-under-parallel-tasks-do-the-patches-still-know-their-base-commit-5he8", "published_at": "2026-07-16 10:38:05+00:00", "updated_at": "2026-07-16 11:03:17.055767+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-safety"], "entities": ["MonkeyCode"], "alternates": {"html": "https://wpnews.pro/news/monkeycode-under-parallel-tasks-do-the-patches-still-know-their-base-commit", "markdown": "https://wpnews.pro/news/monkeycode-under-parallel-tasks-do-the-patches-still-know-their-base-commit.md", "text": "https://wpnews.pro/news/monkeycode-under-parallel-tasks-do-the-patches-still-know-their-base-commit.txt", "jsonld": "https://wpnews.pro/news/monkeycode-under-parallel-tasks-do-the-patches-still-know-their-base-commit.jsonld"}}