oh-my-opencode 4.16.2 → 4.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/.agents/skills/pre-publish-review/SKILL.md +3 -0
  2. package/README.md +2 -2
  3. package/dist/agents/hephaestus/agent.d.ts +1 -1
  4. package/dist/agents/hephaestus/gpt-5-6.d.ts +2 -0
  5. package/dist/agents/momus-gpt-5-6.d.ts +1 -0
  6. package/dist/agents/types.d.ts +2 -0
  7. package/dist/cli/index.js +800 -536
  8. package/dist/cli-node/index.js +800 -536
  9. package/dist/features/background-agent/error-classifier.d.ts +5 -0
  10. package/dist/features/builtin-commands/templates/refactor-sections/intro-and-analysis.d.ts +1 -1
  11. package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
  12. package/dist/index.js +416 -37
  13. package/dist/shared/live-server-route.d.ts +1 -1
  14. package/dist/skills/review-work/SKILL.md +1 -1
  15. package/dist/skills/ulw-plan/references/full-workflow.md +1 -1
  16. package/dist/skills/ulw-research/SKILL.md +2 -2
  17. package/dist/skills/visual-qa/SKILL.md +1 -1
  18. package/dist/tui.js +125 -13
  19. package/package.json +13 -13
  20. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  21. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +398 -246
  22. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  23. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  25. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  26. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  27. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  28. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  29. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  30. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  31. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  32. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  33. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +93 -0
  34. package/packages/omo-codex/plugin/components/rules/dist/cli.js +43 -24
  35. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  36. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  37. package/packages/omo-codex/plugin/components/rules/src/codex-hook.ts +2 -1
  38. package/packages/omo-codex/plugin/components/rules/src/dynamic-target-fingerprints.ts +15 -6
  39. package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +7 -2
  40. package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +2 -2
  41. package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +32 -0
  42. package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +106 -0
  43. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  44. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  45. package/packages/omo-codex/plugin/components/teammode/AGENTS.md +12 -9
  46. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  47. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  48. package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +136 -76
  49. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +94 -23
  50. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +94 -14
  51. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-transport.mjs +55 -0
  52. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +72 -18
  53. package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +23 -0
  54. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  55. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  56. package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +24 -41
  57. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +1 -1
  58. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +1 -1
  59. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-executor.toml +2 -2
  60. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
  61. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +1 -1
  62. package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +21 -49
  63. package/packages/omo-codex/plugin/components/ultrawork/agents/metis.toml +17 -29
  64. package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +20 -50
  65. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +18 -39
  66. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  67. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  68. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
  69. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
  70. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  71. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -1
  72. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  92. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  93. package/packages/omo-codex/plugin/package-lock.json +13 -13
  94. package/packages/omo-codex/plugin/package.json +1 -1
  95. package/packages/omo-codex/plugin/scripts/auto-update.mjs +9 -2
  96. package/packages/omo-codex/plugin/scripts/entry-guard.mjs +26 -0
  97. package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +3 -1
  98. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +39 -4
  99. package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +24 -4
  100. package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +3 -3
  101. package/packages/omo-codex/plugin/scripts/migrate-omo-sot.mjs +2 -2
  102. package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +2 -2
  103. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +6 -4
  104. package/packages/omo-codex/plugin/scripts/sync-version.mjs +4 -2
  105. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +1 -1
  106. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +1 -1
  107. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +1 -1
  108. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +1 -1
  109. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +1 -1
  110. package/packages/omo-codex/plugin/skills/teammode/SKILL.md +136 -76
  111. package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +94 -23
  112. package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +94 -14
  113. package/packages/omo-codex/plugin/skills/teammode/scripts/team-transport.mjs +55 -0
  114. package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +72 -18
  115. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
  116. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
  117. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
  118. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +2 -2
  119. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +47 -1
  120. package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +4 -2
  121. package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +33 -0
  122. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +146 -9
  123. package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +71 -0
  124. package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +32 -0
  125. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +9 -2
  126. package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +345 -0
  127. package/packages/omo-codex/scripts/install-dist/install-local.mjs +436 -284
  128. package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +111 -1
  129. package/packages/shared-skills/skills/review-work/SKILL.md +1 -1
  130. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
  131. package/packages/shared-skills/skills/ulw-research/SKILL.md +2 -2
  132. package/packages/shared-skills/skills/visual-qa/SKILL.md +1 -1
  133. /package/packages/omo-codex/plugin/components/rules/bundled-rules/{hephaestus.md → hephaestus/gpt-5.5.md} +0 -0
package/dist/index.js CHANGED
@@ -20933,6 +20933,11 @@ var AGENT_MODEL_REQUIREMENTS = {
20933
20933
  },
20934
20934
  hephaestus: {
20935
20935
  fallbackChain: [
20936
+ {
20937
+ providers: ["openai", "vercel"],
20938
+ model: "gpt-5.6-sol",
20939
+ variant: "medium"
20940
+ },
20936
20941
  {
20937
20942
  providers: ["openai", "github-copilot", "opencode", "vercel"],
20938
20943
  model: "gpt-5.5",
@@ -20959,7 +20964,7 @@ var AGENT_MODEL_REQUIREMENTS = {
20959
20964
  model: "claude-opus-4-7",
20960
20965
  variant: "max"
20961
20966
  },
20962
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" }
20967
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" }
20963
20968
  ]
20964
20969
  },
20965
20970
  librarian: {
@@ -21006,7 +21011,7 @@ var AGENT_MODEL_REQUIREMENTS = {
21006
21011
  model: "gpt-5.5",
21007
21012
  variant: "high"
21008
21013
  },
21009
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" },
21014
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" },
21010
21015
  {
21011
21016
  providers: ["google", "github-copilot", "opencode", "vercel"],
21012
21017
  model: "gemini-3.1-pro"
@@ -21029,12 +21034,17 @@ var AGENT_MODEL_REQUIREMENTS = {
21029
21034
  model: "gpt-5.5",
21030
21035
  variant: "high"
21031
21036
  },
21032
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" },
21037
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" },
21033
21038
  { providers: ["kimi-for-coding"], model: "k2p5" }
21034
21039
  ]
21035
21040
  },
21036
21041
  momus: {
21037
21042
  fallbackChain: [
21043
+ {
21044
+ providers: ["openai", "vercel"],
21045
+ model: "gpt-5.6-sol",
21046
+ variant: "xhigh"
21047
+ },
21038
21048
  {
21039
21049
  providers: ["openai", "github-copilot", "opencode", "vercel"],
21040
21050
  model: "gpt-5.5",
@@ -21050,7 +21060,7 @@ var AGENT_MODEL_REQUIREMENTS = {
21050
21060
  model: "gemini-3.1-pro",
21051
21061
  variant: "high"
21052
21062
  },
21053
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" }
21063
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" }
21054
21064
  ]
21055
21065
  },
21056
21066
  atlas: {
@@ -21098,12 +21108,17 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21098
21108
  model: "claude-opus-4-7",
21099
21109
  variant: "max"
21100
21110
  },
21101
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" },
21111
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" },
21102
21112
  { providers: ["kimi-for-coding"], model: "k2p5" }
21103
21113
  ]
21104
21114
  },
21105
21115
  ultrabrain: {
21106
21116
  fallbackChain: [
21117
+ {
21118
+ providers: ["openai", "vercel"],
21119
+ model: "gpt-5.6-sol",
21120
+ variant: "xhigh"
21121
+ },
21107
21122
  {
21108
21123
  providers: ["openai", "opencode", "vercel"],
21109
21124
  model: "gpt-5.5",
@@ -21119,11 +21134,16 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21119
21134
  model: "claude-opus-4-7",
21120
21135
  variant: "max"
21121
21136
  },
21122
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" }
21137
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" }
21123
21138
  ]
21124
21139
  },
21125
21140
  deep: {
21126
21141
  fallbackChain: [
21142
+ {
21143
+ providers: ["openai", "vercel"],
21144
+ model: "gpt-5.6-sol",
21145
+ variant: "high"
21146
+ },
21127
21147
  {
21128
21148
  providers: ["openai", "github-copilot", "opencode", "vercel"],
21129
21149
  model: "gpt-5.5",
@@ -21140,7 +21160,7 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21140
21160
  variant: "high"
21141
21161
  },
21142
21162
  { providers: ["opencode-go", "vercel"], model: "kimi-k2.6" },
21143
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" }
21163
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" }
21144
21164
  ]
21145
21165
  },
21146
21166
  artistry: {
@@ -21157,7 +21177,7 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21157
21177
  },
21158
21178
  { providers: ["openai", "github-copilot", "opencode", "vercel"], model: "gpt-5.5" },
21159
21179
  { providers: ["opencode-go", "vercel"], model: "kimi-k2.6" },
21160
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" }
21180
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" }
21161
21181
  ]
21162
21182
  },
21163
21183
  quick: {
@@ -21215,7 +21235,7 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21215
21235
  },
21216
21236
  { providers: ["zai-coding-plan", "opencode", "bailian-coding-plan", "vercel"], model: "glm-5" },
21217
21237
  { providers: ["kimi-for-coding"], model: "k2p5" },
21218
- { providers: ["opencode-go", "vercel"], model: "glm-5.1" },
21238
+ { providers: ["opencode-go", "vercel"], model: "glm-5.2" },
21219
21239
  { providers: ["opencode", "bailian-coding-plan", "vercel"], model: "kimi-k2.5" },
21220
21240
  {
21221
21241
  providers: [
@@ -22567,6 +22587,22 @@ var SUPPLEMENTAL_MODEL_CAPABILITIES = {
22567
22587
  output: 262144
22568
22588
  }
22569
22589
  },
22590
+ "gpt-5.6-sol": {
22591
+ id: "gpt-5.6-sol",
22592
+ family: "gpt",
22593
+ reasoning: true,
22594
+ temperature: false,
22595
+ toolCall: true,
22596
+ modalities: {
22597
+ input: ["text", "image", "pdf"],
22598
+ output: ["text"]
22599
+ },
22600
+ limit: {
22601
+ context: 1050000,
22602
+ input: 922000,
22603
+ output: 128000
22604
+ }
22605
+ },
22570
22606
  "gpt-5.5": {
22571
22607
  id: "gpt-5.5",
22572
22608
  family: "gpt",
@@ -23696,6 +23732,10 @@ function isGpt5_5Model(model) {
23696
23732
  const modelName = extractModelName2(model).toLowerCase();
23697
23733
  return modelName.includes("gpt-5.5") || modelName.includes("gpt-5-5");
23698
23734
  }
23735
+ function isGpt5_6Model(model) {
23736
+ const modelName = extractModelName2(model).toLowerCase();
23737
+ return modelName.includes("gpt-5.6") || modelName.includes("gpt-5-6");
23738
+ }
23699
23739
 
23700
23740
  // packages/omo-opencode/src/tools/delegate-task/openai-categories.ts
23701
23741
  var ULTRABRAIN_CATEGORY_PROMPT_APPEND = `<Category_Context>
@@ -23761,7 +23801,7 @@ The orchestrator chose this category because the task benefits from depth over s
23761
23801
  **Status cadence: sparse.** The user is not on the other side of this conversation; the orchestrator is, and they will synthesize your progress. Send commentary only at meaningful phase transitions (starting exploration, starting implementation, starting verification, hitting a genuine blocker). Do not narrate every tool call; silence during focused work is expected.
23762
23802
  </Category_Context>`;
23763
23803
  function resolveDeepCategoryPromptAppend(model) {
23764
- if (model && isGpt5_5Model(model)) {
23804
+ if (model && (isGpt5_5Model(model) || isGpt5_6Model(model))) {
23765
23805
  return DEEP_CATEGORY_PROMPT_APPEND_GPT_5_5;
23766
23806
  }
23767
23807
  return DEEP_CATEGORY_PROMPT_APPEND;
@@ -23819,13 +23859,13 @@ If your prompt lacks this structure, REWRITE IT before delegating.
23819
23859
  var OPENAI_CATEGORIES = [
23820
23860
  {
23821
23861
  name: "ultrabrain",
23822
- config: { model: "openai/gpt-5.5", variant: "xhigh" },
23862
+ config: { model: "openai/gpt-5.6-sol", variant: "xhigh" },
23823
23863
  description: "Use ONLY for genuinely hard, logic-heavy tasks. Give clear goals only, not step-by-step instructions.",
23824
23864
  promptAppend: ULTRABRAIN_CATEGORY_PROMPT_APPEND
23825
23865
  },
23826
23866
  {
23827
23867
  name: "deep",
23828
- config: { model: "openai/gpt-5.5", variant: "medium" },
23868
+ config: { model: "openai/gpt-5.6-sol", variant: "high" },
23829
23869
  description: "Goal-oriented autonomous problem-solving on hairy problems requiring deep research. ONE goal + ONE deliverable per call \u2014 multiple goals must fan out as parallel `deep` calls, never bundled into one.",
23830
23870
  promptAppend: DEEP_CATEGORY_PROMPT_APPEND,
23831
23871
  resolvePromptAppend: resolveDeepCategoryPromptAppend
@@ -78000,6 +78040,7 @@ function injectServerAuthIntoClient(client3) {
78000
78040
  init_logger2();
78001
78041
  var PROBE_TTL_MS = 60000;
78002
78042
  var PROBE_ABORT_MS = 1500;
78043
+ var AFFINITY_TTL_MS = 60000;
78003
78044
  var registrations = new Map;
78004
78045
  var lastRegistration;
78005
78046
  var liveParentWakeRoutingDisabled = false;
@@ -78017,7 +78058,9 @@ function initLiveServerRoute(opts) {
78017
78058
  available: undefined,
78018
78059
  probeTimestamp: 0,
78019
78060
  inFlightProbe: undefined,
78020
- warnedOnce: false
78061
+ warnedOnce: false,
78062
+ sessionAffinity: new Map,
78063
+ inFlightAffinity: new Map
78021
78064
  };
78022
78065
  registrations.set(opts.inProcessClient, registration);
78023
78066
  lastRegistration = registration;
@@ -78071,6 +78114,66 @@ async function probe(registration) {
78071
78114
  return false;
78072
78115
  }
78073
78116
  }
78117
+ async function probeSessionAffinity(registration, sessionID) {
78118
+ if (!registration.serverUrl) {
78119
+ return;
78120
+ }
78121
+ const probeUrl = new URL(`/session/${sessionID}`, registration.serverUrl);
78122
+ const authHeader = getServerBasicAuthHeader();
78123
+ const headers = authHeader ? { Authorization: authHeader } : {};
78124
+ try {
78125
+ const controller = new AbortController;
78126
+ const timeoutId = setTimeout(() => controller.abort(), PROBE_ABORT_MS);
78127
+ let response;
78128
+ try {
78129
+ response = await getFetch()(probeUrl, { headers, signal: controller.signal });
78130
+ } finally {
78131
+ clearTimeout(timeoutId);
78132
+ }
78133
+ if (response.ok) {
78134
+ setSessionAffinity(registration, sessionID, true);
78135
+ return true;
78136
+ }
78137
+ if (response.status === 404) {
78138
+ setSessionAffinity(registration, sessionID, false);
78139
+ log2("[live-server-route] live listener does not own session; falling back to in-process client", { sessionID });
78140
+ return false;
78141
+ }
78142
+ return;
78143
+ } catch {
78144
+ return;
78145
+ }
78146
+ }
78147
+ function setSessionAffinity(registration, sessionID, owned) {
78148
+ const now = Date.now();
78149
+ for (const [key, entry] of registration.sessionAffinity) {
78150
+ if (now - entry.timestamp >= AFFINITY_TTL_MS) {
78151
+ registration.sessionAffinity.delete(key);
78152
+ }
78153
+ }
78154
+ registration.sessionAffinity.set(sessionID, { owned, timestamp: now });
78155
+ }
78156
+ function getFreshSessionAffinity(registration, sessionID) {
78157
+ const entry = registration.sessionAffinity.get(sessionID);
78158
+ if (!entry || Date.now() - entry.timestamp >= AFFINITY_TTL_MS) {
78159
+ return;
78160
+ }
78161
+ return entry.owned;
78162
+ }
78163
+ async function resolveSessionAffinity(registration, sessionID) {
78164
+ const cached = getFreshSessionAffinity(registration, sessionID);
78165
+ if (cached !== undefined) {
78166
+ return cached;
78167
+ }
78168
+ let inFlight = registration.inFlightAffinity.get(sessionID);
78169
+ if (!inFlight) {
78170
+ inFlight = probeSessionAffinity(registration, sessionID).finally(() => {
78171
+ registration.inFlightAffinity.delete(sessionID);
78172
+ });
78173
+ registration.inFlightAffinity.set(sessionID, inFlight);
78174
+ }
78175
+ return inFlight;
78176
+ }
78074
78177
  function getFreshProbeAvailability(registration) {
78075
78178
  const available = registration.available;
78076
78179
  if (available === undefined || Date.now() - registration.probeTimestamp >= PROBE_TTL_MS) {
@@ -78123,6 +78226,13 @@ function tryResolveDispatchClientSync2(client3, sessionID) {
78123
78226
  if (!freshAvailability) {
78124
78227
  return { client: client3, route: "in-process", reason: "unavailable" };
78125
78228
  }
78229
+ const cachedAffinity = getFreshSessionAffinity(registration, sessionID);
78230
+ if (cachedAffinity === undefined) {
78231
+ return;
78232
+ }
78233
+ if (!cachedAffinity) {
78234
+ return { client: client3, route: "in-process", reason: "affinity" };
78235
+ }
78126
78236
  const resolvedLiveClient = getOrBuildLiveClient(registration);
78127
78237
  if (!resolvedLiveClient) {
78128
78238
  return { client: client3, route: "in-process", reason: "unavailable" };
@@ -78142,6 +78252,10 @@ async function resolveDispatchClient2(client3, sessionID) {
78142
78252
  if (!isAvailable) {
78143
78253
  return { client: client3, route: "in-process", reason: "unavailable" };
78144
78254
  }
78255
+ const affinity = await resolveSessionAffinity(registration, sessionID);
78256
+ if (affinity === false) {
78257
+ return { client: client3, route: "in-process", reason: "affinity" };
78258
+ }
78145
78259
  const resolvedLiveClient = getOrBuildLiveClient(registration);
78146
78260
  if (!resolvedLiveClient) {
78147
78261
  return { client: client3, route: "in-process", reason: "unavailable" };
@@ -78179,6 +78293,7 @@ function markLiveRouteUnavailable2(reason) {
78179
78293
  for (const registration of registrations.values()) {
78180
78294
  registration.available = false;
78181
78295
  registration.probeTimestamp = Date.now();
78296
+ registration.sessionAffinity.clear();
78182
78297
  }
78183
78298
  log2(`[live-server-route] marked unavailable: ${reason}`);
78184
78299
  }
@@ -89498,7 +89613,7 @@ function getCachedVersion(options = {}) {
89498
89613
  // package.json
89499
89614
  var package_default = {
89500
89615
  name: "oh-my-opencode",
89501
- version: "4.16.2",
89616
+ version: "4.16.3",
89502
89617
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
89503
89618
  main: "./dist/index.js",
89504
89619
  types: "dist/index.d.ts",
@@ -89708,18 +89823,18 @@ var package_default = {
89708
89823
  typescript: "^6.0.3"
89709
89824
  },
89710
89825
  optionalDependencies: {
89711
- "oh-my-opencode-darwin-arm64": "4.16.2",
89712
- "oh-my-opencode-darwin-x64": "4.16.2",
89713
- "oh-my-opencode-darwin-x64-baseline": "4.16.2",
89714
- "oh-my-opencode-linux-arm64": "4.16.2",
89715
- "oh-my-opencode-linux-arm64-musl": "4.16.2",
89716
- "oh-my-opencode-linux-x64": "4.16.2",
89717
- "oh-my-opencode-linux-x64-baseline": "4.16.2",
89718
- "oh-my-opencode-linux-x64-musl": "4.16.2",
89719
- "oh-my-opencode-linux-x64-musl-baseline": "4.16.2",
89720
- "oh-my-opencode-windows-arm64": "4.16.2",
89721
- "oh-my-opencode-windows-x64": "4.16.2",
89722
- "oh-my-opencode-windows-x64-baseline": "4.16.2"
89826
+ "oh-my-opencode-darwin-arm64": "4.16.3",
89827
+ "oh-my-opencode-darwin-x64": "4.16.3",
89828
+ "oh-my-opencode-darwin-x64-baseline": "4.16.3",
89829
+ "oh-my-opencode-linux-arm64": "4.16.3",
89830
+ "oh-my-opencode-linux-arm64-musl": "4.16.3",
89831
+ "oh-my-opencode-linux-x64": "4.16.3",
89832
+ "oh-my-opencode-linux-x64-baseline": "4.16.3",
89833
+ "oh-my-opencode-linux-x64-musl": "4.16.3",
89834
+ "oh-my-opencode-linux-x64-musl-baseline": "4.16.3",
89835
+ "oh-my-opencode-windows-arm64": "4.16.3",
89836
+ "oh-my-opencode-windows-x64": "4.16.3",
89837
+ "oh-my-opencode-windows-x64-baseline": "4.16.3"
89723
89838
  },
89724
89839
  overrides: {
89725
89840
  "@earendil-works/pi-agent-core": "0.80.3",
@@ -103685,7 +103800,7 @@ This command includes examples for the OpenCode harness. In Codex, do not call O
103685
103800
  | \`task(subagent_type="oracle", ...)\` | \`multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})\` |
103686
103801
  | \`task(category="...", ...)\` | \`multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})\` |
103687
103802
  | \`background_output(task_id="...")\` | \`multi_agent_v1.wait_agent(...)\` for mailbox signals |
103688
- | \`team_*(...)\` | Use Codex native subagents via \`multi_agent_v1.spawn_agent\`, \`multi_agent_v1.send_input\`, \`multi_agent_v1.wait_agent\`, and \`multi_agent_v1.close_agent\` |
103803
+ | \`team_*(...)\` | Use Codex native subagents via \`multi_agent_v1.spawn_agent\` and \`multi_agent_v1.wait_agent\`; use \`multi_agent_v1.send_input\` and \`multi_agent_v1.close_agent\` only when exposed in the active tools list |
103689
103804
 
103690
103805
  Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If \`multi_agent_v1.*\` tools exist, use the table above as written. If instead a flat \`spawn_agent\` with a required \`task_name\` exists (\`multi_agent_v2\`), rewrite every \`multi_agent_v1.*\` example: \`multi_agent_v1.spawn_agent({...,"fork_context":false})\` becomes \`spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})\` (\`"all"\` only when full parent history is truly required); \`send_input\` becomes \`send_message\`; do not call \`close_agent\`/\`resume_agent\` (finished agents end on their own; \`followup_task\` re-tasks one, \`interrupt_agent\` stops one); \`wait_agent\` takes only \`timeout_ms\` and returns on any child mailbox activity. \`agent_type\` works the same on both surfaces. If a code block below conflicts with this section, this section wins.
103691
103806
 
@@ -104657,7 +104772,7 @@ This command includes examples for the OpenCode harness. In Codex, do not call O
104657
104772
  | \`task(subagent_type="oracle", ...)\` | \`multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})\` |
104658
104773
  | \`task(category="...", ...)\` | \`multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})\` |
104659
104774
  | \`background_output(task_id="...")\` | \`multi_agent_v1.wait_agent(...)\` for mailbox signals |
104660
- | \`team_*(...)\` | Use Codex native subagents via \`multi_agent_v1.spawn_agent\`, \`multi_agent_v1.send_input\`, \`multi_agent_v1.wait_agent\`, and \`multi_agent_v1.close_agent\` |
104775
+ | \`team_*(...)\` | Use Codex native subagents via \`multi_agent_v1.spawn_agent\` and \`multi_agent_v1.wait_agent\`; use \`multi_agent_v1.send_input\` and \`multi_agent_v1.close_agent\` only when exposed in the active tools list |
104661
104776
 
104662
104777
  Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If \`multi_agent_v1.*\` tools exist, use the table above as written. If instead a flat \`spawn_agent\` with a required \`task_name\` exists (\`multi_agent_v2\`), rewrite every \`multi_agent_v1.*\` example: \`multi_agent_v1.spawn_agent({...,"fork_context":false})\` becomes \`spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})\` (\`"all"\` only when full parent history is truly required); \`send_input\` becomes \`send_message\`; do not call \`close_agent\`/\`resume_agent\` (finished agents end on their own; \`followup_task\` re-tasks one, \`interrupt_agent\` stops one); \`wait_agent\` takes only \`timeout_ms\` and returns on any child mailbox activity. \`agent_type\` works the same on both surfaces. If a code block below conflicts with this section, this section wins.
104663
104778
 
@@ -118880,6 +118995,30 @@ function getSessionErrorMessage(properties) {
118880
118995
  const message = errorRaw["message"];
118881
118996
  return typeof message === "string" ? message : undefined;
118882
118997
  }
118998
+ var TERMINAL_SESSION_ERROR_PATTERNS = [
118999
+ /no provider available/i,
119000
+ /provider not (available|found|configured)/i,
119001
+ /provider is forbidden/i,
119002
+ /selected provider is forbidden/i,
119003
+ /unknown provider/i,
119004
+ /model not supported/i,
119005
+ /model_not_supported/i,
119006
+ /model[_\s-]*not[_\s-]*found/i,
119007
+ /(?:no|missing)[_\s-]*(?:api|auth(?:entication)?)[_\s-]*key/i,
119008
+ /(?:api|auth(?:entication)?)[_\s-]*key(?:[_\s-]+is)?[_\s-]*(?:missing|not[_\s-]*(?:found|configured)|required)/i,
119009
+ /no models available/i,
119010
+ /no connected providers/i,
119011
+ /all providers (?:are )?(?:unavailable|disconnected|exhausted)/i
119012
+ ];
119013
+ function isTerminalSessionError(errorInfo) {
119014
+ const text = [
119015
+ errorInfo?.name,
119016
+ errorInfo?.message
119017
+ ].filter((value) => typeof value === "string" && value.length > 0).join(" ");
119018
+ if (text.length === 0)
119019
+ return false;
119020
+ return TERMINAL_SESSION_ERROR_PATTERNS.some((pattern) => pattern.test(text));
119021
+ }
118883
119022
 
118884
119023
  // packages/omo-opencode/src/tools/background-task/task-result-format.ts
118885
119024
  function getTimeString(value) {
@@ -131527,7 +131666,7 @@ The fallback retry session is now created and can be inspected directly.
131527
131666
  const sessionId = task.sessionId;
131528
131667
  if (sessionId) {
131529
131668
  const sessionStillAlive = await this.verifySessionExists(sessionId);
131530
- if (sessionStillAlive) {
131669
+ if (sessionStillAlive && !isTerminalSessionError(errorInfo)) {
131531
131670
  this.logger("[background-agent] session.error received but session still alive, treating as transient:", {
131532
131671
  taskId: task.id,
131533
131672
  sessionId,
@@ -131535,6 +131674,14 @@ The fallback retry session is now created and can be inspected directly.
131535
131674
  });
131536
131675
  return;
131537
131676
  }
131677
+ if (sessionStillAlive && isTerminalSessionError(errorInfo)) {
131678
+ this.logger("[background-agent] Finalizing task after terminal session.error (session shell alive but will never produce output):", {
131679
+ taskId: task.id,
131680
+ sessionId,
131681
+ errorName,
131682
+ errorMessage: errorMsg?.slice(0, 200)
131683
+ });
131684
+ }
131538
131685
  }
131539
131686
  if (task.currentAttemptID) {
131540
131687
  finalizeAttempt(task, task.currentAttemptID, "error", errorMsg);
@@ -143848,7 +143995,7 @@ task(subagent_type="explore", run_in_background=true, ...)
143848
143995
  // packages/omo-opencode/src/agents/frontier-tool-schema-guard.ts
143849
143996
  var FRONTIER_TOOL_SCHEMA_NAMES = ["grep", "glob"];
143850
143997
  function getFrontierToolSchemaPermission(model) {
143851
- return isClaudeOpus47OrLaterModel(model) || isGpt5_5Model(model) ? { grep: "deny", glob: "deny" } : {};
143998
+ return isClaudeOpus47OrLaterModel(model) || isGpt5_5Model(model) || isGpt5_6Model(model) ? { grep: "deny", glob: "deny" } : {};
143852
143999
  }
143853
144000
  function applyFrontierToolSchemaPermission(permission, model, explicitPermission, explicitTools) {
143854
144001
  if (!permission)
@@ -147506,7 +147653,7 @@ function resolveSisyphusPromptFamily(model) {
147506
147653
  return "kimi-k2-7";
147507
147654
  if (isKimiK2Model(model))
147508
147655
  return "kimi-k2-6";
147509
- if (isGpt5_5Model(model))
147656
+ if (isGpt5_5Model(model) || isGpt5_6Model(model))
147510
147657
  return "gpt-5-5";
147511
147658
  if (isGptNativeSisyphusModel(model))
147512
147659
  return "gpt-5-4";
@@ -147950,7 +148097,7 @@ function createOracleAgent(model) {
147950
148097
  ...restrictions,
147951
148098
  prompt: ORACLE_DEFAULT_PROMPT
147952
148099
  };
147953
- if (isGpt5_5Model(model)) {
148100
+ if (isGpt5_5Model(model) || isGpt5_6Model(model)) {
147954
148101
  return {
147955
148102
  ...base,
147956
148103
  prompt: ORACLE_GPT_5_5_PROMPT,
@@ -149041,6 +149188,60 @@ var atlasPromptMetadata = {
149041
149188
  ],
149042
149189
  keyTrigger: "Todo list path provided OR multiple tasks requiring multi-agent orchestration"
149043
149190
  };
149191
+ // packages/omo-opencode/src/agents/momus-gpt-5-6.ts
149192
+ var MOMUS_GPT_5_6_PROMPT = `Role: plan reviewer for OhMyOpenCode. You verify that a work plan is executable and its references are valid. You are a blocker-finder, not a perfectionist.
149193
+
149194
+ # Input contract
149195
+
149196
+ Extract a single \`.omo/plans/*.md\` path from anywhere in the input, ignoring system directives and wrappers (\`<system-reminder>\`, \`[analyze-mode]\`, and similar). Exactly one path: read it and review. Zero or multiple paths: reject as invalid input. YAML plan files (\`.yml\`/\`.yaml\`) are non-reviewable: reject.
149197
+
149198
+ On a follow-up turn with the same plan path, re-read the file from disk before issuing any verdict. The current on-disk contents are the only source of truth; a previous verdict is stale evidence.
149199
+
149200
+ # Goal
149201
+
149202
+ Answer one question: "Can a capable developer execute this plan without getting stuck?"
149203
+
149204
+ # Success criteria
149205
+
149206
+ - Referenced files verified to exist and contain the claimed content.
149207
+ - Every task has enough context to start working.
149208
+ - No blocking contradictions or impossible requirements.
149209
+ - Every task has executable QA scenarios: a specific tool, concrete steps, an expected result.
149210
+ - Verdict issued: OKAY or REJECT, with at most 3 specific issues on REJECT.
149211
+
149212
+ # What you check (only these four)
149213
+
149214
+ **References**: referenced files exist; cited line numbers contain relevant code; a "follow pattern in X" claim is demonstrated by X. Fail only when a reference does not exist or points to completely wrong content.
149215
+
149216
+ **Executability**: each task gives a developer a starting point. Details that can be figured out during implementation pass. Fail only when a task is so vague there is no idea where to begin.
149217
+
149218
+ **Contradictions**: information gaps that completely stop work, or tasks that contradict each other.
149219
+
149220
+ **QA scenarios**: each task's scenarios name tool + steps + expected result. Unexecutable scenarios ("verify it works", "check the page") block the Final Verification Wave and are practical blockers.
149221
+
149222
+ Out of scope: approach optimality, alternative designs, undocumented edge cases, architecture, code quality, performance, and security unless explicitly broken.
149223
+
149224
+ # Decision rules
149225
+
149226
+ - Default verdict is OKAY. When in doubt, approve: a plan that is 80% clear is executable, and developers resolve minor gaps themselves.
149227
+ - REJECT only for a verified blocker: a referenced file does not exist (confirmed by reading), a task has zero context to start, the plan contradicts itself, or QA scenarios are missing or unexecutable.
149228
+ - Each REJECT issue must name the exact file or task, state what needs to change, and be something work cannot proceed without. Cap at the 3 most critical issues.
149229
+ - "Could be clearer", stylistic preferences, missing edge cases, and disagreement with the author's approach are never blockers.
149230
+
149231
+ # Process
149232
+
149233
+ Read the plan, then verify references by reading the cited files; parallelize independent reads. Check each task for a starting point and executable QA scenarios. Decide. Do not narrate the reads; go straight to the verdict.
149234
+
149235
+ # Output
149236
+
149237
+ **[OKAY]** or **[REJECT]**
149238
+
149239
+ **Summary**: 1-2 sentences of prose explaining the verdict.
149240
+
149241
+ If REJECT - **Blocking Issues** (max 3): numbered, each naming the exact issue and the change needed.
149242
+
149243
+ Keep every fact needed to act on the verdict; trim restatements of the plan, generic advice, and commentary on non-blockers. Match the language of the plan content.`;
149244
+
149044
149245
  // packages/omo-opencode/src/agents/momus.ts
149045
149246
  var MODE8 = "subagent";
149046
149247
  var MOMUS_DEFAULT_PROMPT = `You are a **practical** work plan reviewer. Your goal is simple: verify that the plan is **executable** and **references are valid**.
@@ -149309,6 +149510,14 @@ function createMomusAgent(model) {
149309
149510
  ...restrictions,
149310
149511
  prompt: MOMUS_DEFAULT_PROMPT
149311
149512
  };
149513
+ if (isGpt5_6Model(model)) {
149514
+ return {
149515
+ ...base,
149516
+ prompt: MOMUS_GPT_5_6_PROMPT,
149517
+ reasoningEffort: "xhigh",
149518
+ textVerbosity: "high"
149519
+ };
149520
+ }
149312
149521
  if (isGptModel(model)) {
149313
149522
  return {
149314
149523
  ...base,
@@ -150182,16 +150391,180 @@ function buildGpt55HephaestusPrompt(availableAgents, _availableTools = [], avail
150182
150391
  return HEPHAESTUS_GPT_5_5_TEMPLATE.replace("{{ taskSystemGuide }}", taskSystemGuide).replace("{{ categorySkillsGuide }}", categorySkillsGuide).replace("{{ delegationTable }}", delegationTable).replace("{{ oracleSection }}", oracleSection).replace("{{ frontendGuidance }}", frontendGuidance);
150183
150392
  }
150184
150393
 
150394
+ // packages/omo-opencode/src/agents/hephaestus/gpt-5-6.ts
150395
+ function buildTaskSystemGuide3(useTaskSystem) {
150396
+ if (useTaskSystem) {
150397
+ return `Create tasks for any non-trivial work (2+ steps, uncertain scope, multiple items). Call \`task_create\` with atomic steps before starting. Mark exactly one item \`in_progress\` at a time via \`task_update\`. Mark items \`completed\` immediately when done; never batch. Update the task list when scope shifts.`;
150398
+ }
150399
+ return `Create todos for any non-trivial work (2+ steps, uncertain scope, multiple items). Call \`todowrite\` with atomic steps before starting. Mark exactly one item \`in_progress\` at a time. Mark items \`completed\` immediately when done; never batch. Update the todo list when scope shifts.`;
150400
+ }
150401
+ var HEPHAESTUS_GPT_5_6_TEMPLATE = `You are Hephaestus, an autonomous deep worker based on GPT-5.6. You and the user share one workspace. You receive goals, not step-by-step instructions, and execute them end-to-end.
150402
+
150403
+ ID contract: background task IDs (\`bg_...\`) use \`background_output(task_id="bg_...")\`; continuation IDs (\`ses_...\`) use \`task(task_id="ses_...")\`.
150404
+
150405
+ # Autonomy
150406
+
150407
+ User instructions override these defaults; newer instructions override older ones. Safety and type-safety constraints never yield.
150408
+
150409
+ Implement, don't propose. Unless the user is explicitly asking a question, brainstorming, or requesting a plan, they want working code, not a description of it. Messages imply action: "how does X work" means understand X to fix or improve it; "why is A broken" means diagnose and fix A. Treat a message as answer-only when the user says so ("just explain", "don't change anything"). State your read in one line before acting - that line commits you to finish the named work this turn.
150410
+
150411
+ Make the requested in-scope changes and run non-destructive validation without asking first. Resolve blockers yourself using context and reasonable assumptions; ask only when the missing information would materially change the outcome or the action is destructive - one narrow question, then stop. Never ask permission for obvious work.
150412
+
150413
+ If the user's plan or design seems flawed, say so concisely, propose the alternative, and ask whether to proceed with the original or the alternative - do not silently override. Mention high-impact bugs you spot along the way briefly; broaden the task only when it blocks the requested outcome or the user asks.
150414
+
150415
+ Status requests are not stop signals: give the update, keep working. The newest non-conflicting message wins; honor every non-conflicting request since your last turn. After compaction, continue from the summary; don't restart.
150416
+
150417
+ Unexpected worktree changes you did not make: keep working - the user and other agents work concurrently. Never revert or modify changes you did not make unless explicitly asked. Work around unrelated ones; if a direct conflict with your task is unresolvable, ask one precise question.
150418
+
150419
+ # Goal
150420
+
150421
+ Resolve the user's task end-to-end in this turn. The goal is not a green build; it is an artifact that **works when used through its surface** (Manual QA Gate). Clean \`lsp_diagnostics\`, green build, passing tests are evidence on the way to that gate, not the gate itself. The user's spec is the spec; "done" means the spec is satisfied in observable behavior.
150422
+
150423
+ # Discovery & Retrieval
150424
+
150425
+ Never speculate about code you have not read. The worktree is shared: verify with tools and re-read on every hand-off, even when the request feels familiar.
150426
+
150427
+ Start broad once: for non-trivial work, fire 2-5 \`explore\` or \`librarian\` sub-agents in parallel with \`run_in_background=true\` plus direct reads of files you already know are relevant - same response. Retrieve again only when the core question is still open, a required fact, path, type, or convention is missing, or a second-order question (callers, error paths, ownership) changes the design. Stop when you can act, sources repeat, or two rounds add nothing new.
150428
+
150429
+ When uncertain whether to call a tool, call it. If a finding seems too simple for the complexity of the question, check one more layer of dependencies or callers. Prefer the root fix over the symptom fix. Resolve prerequisite lookups before any action that depends on them.
150430
+
150431
+ Once you delegate exploration to background agents, do not search the same thing yourself: do non-overlapping prep or end your response and wait for the completion notification. Do not poll \`background_output\` on running tasks.
150432
+
150433
+ # Parallelize
150434
+
150435
+ Independent tool calls run in the same response; serial is the exception and requires a real dependency. Each independent shell command is its own tool call - do not chain unrelated steps with \`;\` or \`&&\`. After every file edit, run \`lsp_diagnostics\` on every changed file in parallel.
150436
+
150437
+ # Operating Loop
150438
+
150439
+ **Explore -> Plan -> Implement -> Verify -> Manually QA.**
150440
+
150441
+ - **Explore** per Discovery & Retrieval.
150442
+ - **Plan** with \`update_plan\` for non-trivial work: files to modify, specific changes, dependencies. Skip planning for the easiest 25%; never make single-step plans.
150443
+ - **Implement** surgically, matching codebase style - naming, indentation, imports, error handling - even when you would write it differently in a greenfield.
150444
+ - **Verify** with the most relevant validation available, in parallel where possible: \`lsp_diagnostics\` on changed files, targeted tests for changed behavior, build for affected packages. If validation cannot run, say why and name the next best check.
150445
+ - **Manually QA** through the artifact's surface, then write the final message.
150446
+
150447
+ # Manual QA Gate
150448
+
150449
+ Diagnostics catch type errors, not logic bugs; tests cover only what their authors anticipated. **"Done" requires you have personally used the deliverable through its matching surface and observed it working this turn.**
150450
+
150451
+ - **TUI / CLI / shell binary** - launch inside \`interactive_bash\` (tmux): happy path, one bad input, \`--help\`, read the rendered output.
150452
+ - **Web / browser-rendered UI** - load the \`playwright\` skill and drive a real browser: click, fill, watch the console.
150453
+ - **HTTP API / running service** - hit the live process with \`curl\` or a driver script.
150454
+ - **Library / SDK / module** - minimal driver script that imports and executes the new code end-to-end.
150455
+ - **No matching surface** - do what a real user would do to discover it works.
150456
+
150457
+ "This should work" from reading source does not pass. A defect found in usage is yours to fix this turn.
150458
+
150459
+ # Failure Recovery
150460
+
150461
+ If an approach fails, try a materially different one - different algorithm, library, or pattern, not a small tweak. Verify after every attempt; stale state is the most common cause of confusing failures.
150462
+
150463
+ After three different approaches fail: stop editing, revert to a known-good state, document each attempt and why it failed, consult Oracle synchronously with full failure context, and only if Oracle cannot resolve it, ask the user one precise question.
150464
+
150465
+ # Pragmatism & Scope
150466
+
150467
+ The best change is usually the smallest correct change. Prefer the approach with fewer new names, helpers, and layers. Keep single-use logic inline; a little duplication beats speculative abstraction. Bug fix != surrounding cleanup. Fix only issues your changes caused; report pre-existing problems in the final message instead of expanding the diff.
150468
+
150469
+ Write only what the current correct path needs. No error handlers, fallbacks, retries, or validation for scenarios the current contracts exclude - validate at system boundaries only (user input, external APIs, untrusted I/O). No backward-compatibility shims or alternate paths "in case": preserve old formats only for persisted data, shipped behavior, external consumers, or explicit requirements. Unreleased shapes from the current cycle are drafts, not contracts.
150470
+
150471
+ Default to not adding tests. Add one only when the user asks, the change fixes a subtle bug, or it protects an important behavioral boundary existing tests miss. Never add tests to a codebase with no tests.
150472
+
150473
+ # Code review requests
150474
+
150475
+ When asked for a "review", findings come first, ordered by severity with file references; open questions and assumptions follow; change-summary is secondary. If no findings, say so and name residual risks or testing gaps.
150476
+
150477
+ {{ frontendGuidance }}
150478
+
150479
+ # AGENTS.md
150480
+
150481
+ AGENTS.md files carry directory-scoped conventions. Obey them for files in their scope; deeper files win on conflict; explicit user instructions override.
150482
+
150483
+ # Output
150484
+
150485
+ **Preamble.** Before the first tool call on a multi-step task, one or two user-visible sentences: acknowledge the request, state the first concrete step.
150486
+
150487
+ **During work.** Update only at meaningful phase changes - a discovery that changes the plan, a decision with tradeoffs, a blocker. One sentence each. Do not narrate routine reads.
150488
+
150489
+ **Final message.** Lead with the result. Keep every required fact, decision, caveat, and next action; trim introductions, repetition, and generic reassurance first. Group by user-facing outcome, not by file. Include the evidence needed to trust the work - what you verified and what you could not (with the reason) - then stop.
150490
+
150491
+ **Formatting.**
150492
+
150493
+ - File references: \`src/auth.ts\` or \`src/auth.ts:42\` (1-based, optional line). No \`file://\`, \`vscode://\`, or \`https://\` URIs for local files. No line ranges.
150494
+ - Multi-line code in fenced blocks with a language tag.
150495
+ - The user does not see command outputs - summarize the key lines.
150496
+ - No emojis or em dashes unless the user explicitly requests them.
150497
+ - Never output broken inline citations like \`\u3010F:README.md\u2020L5-L14\u3011\` - they break the CLI.
150498
+
150499
+ # Tool Use
150500
+
150501
+ **File edits.** ${GPT_APPLY_PATCH_GUIDANCE}
150502
+
150503
+ **\`task()\`** for research sub-agents and category delegation. Allowed: \`subagent_type="explore"\`, \`"librarian"\`, \`"oracle"\`, or \`category="..."\`. Direct execution is your default; delegate to a category only when the unit of work clearly exceeds a single coherent edit.
150504
+
150505
+ - Every \`task()\` call needs \`load_skills\` (an empty array \`[]\` is valid).
150506
+ - Reuse continuation IDs (\`ses_...\`) for follow-ups via \`task(task_id="ses_...")\`; never pass background task IDs (\`bg_...\`) to \`task()\`. This preserves the sub-agent's full context and saves 70%+ of tokens.
150507
+ - Sub-agent prompts carry four fields - **CONTEXT** (task, modules, approach), **GOAL** (what decision the results unblock), **DOWNSTREAM** (how you will use them), **REQUEST** (what to find, return format, what to skip).
150508
+
150509
+ **Background tasks.** Collect results via \`background_output(task_id="bg_...")\` after completion. Before the final answer, cancel disposable tasks individually via \`background_cancel(taskId="bg_...")\`; never \`background_cancel(all=true)\` - it kills tasks whose results you have not collected.
150510
+
150511
+ **\`skill\`** loads specialized instruction packs. Load a skill whenever its declared domain even loosely connects to the task - loading an irrelevant skill costs almost nothing; missing a relevant one degrades the work.
150512
+
150513
+ **Shell.** Use \`rg\` for text and file search. Do not use Python to read or write files when a shell command or the file-edit tools suffice.
150514
+
150515
+ {{ categorySkillsGuide }}
150516
+
150517
+ {{ delegationTable }}
150518
+
150519
+ {{ oracleSection }}
150520
+
150521
+ # Success Criteria
150522
+
150523
+ Done when ALL of:
150524
+
150525
+ - Every behavior the user asked for is implemented - no partial delivery, no "v0 / extend later".
150526
+ - \`lsp_diagnostics\` clean on every file you changed.
150527
+ - Build (if applicable) exits 0; tests pass, or pre-existing failures are named with the reason.
150528
+ - The artifact has been driven through its matching surface this turn (Manual QA Gate).
150529
+ - The final message reports what you did, what you verified, what you could not verify (with the reason), and pre-existing issues you noticed but did not touch.
150530
+
150531
+ When you think you are done: re-read the original request and your intent line, run verification once more on changed files in parallel, then report.
150532
+
150533
+ # Stop Rules
150534
+
150535
+ Write the final message and stop only when Success Criteria are all true. Until then keep going - through failed tool calls, long turns, and the temptation to hand back a draft. Do not stop after a delegated sub-agent returns without verifying its work file-by-file.
150536
+
150537
+ **Hard invariants** - non-negotiable, regardless of pressure to ship:
150538
+
150539
+ - Never delete failing tests to get a green build. Never weaken a test to make it pass.
150540
+ - Never use \`as any\`, \`@ts-ignore\`, or \`@ts-expect-error\` to suppress type errors.
150541
+ - Never use destructive git commands (\`reset --hard\`, \`checkout --\`, force-push) without explicit approval. Never amend commits unless explicitly asked.
150542
+ - Never invent citations, tool output, or verification results.
150543
+
150544
+ # Task Tracking
150545
+
150546
+ {{ taskSystemGuide }}
150547
+ `;
150548
+ function buildGpt56HephaestusPrompt(availableAgents, _availableTools = [], availableSkills = [], availableCategories = [], useTaskSystem = false) {
150549
+ const taskSystemGuide = buildTaskSystemGuide3(useTaskSystem);
150550
+ const categorySkillsGuide = buildCategorySkillsDelegationGuide(availableCategories, availableSkills);
150551
+ const delegationTable = buildDelegationTable(availableAgents);
150552
+ const oracleSection = buildOracleSection(availableAgents);
150553
+ const frontendGuidance = buildFrontendGuidanceSection(availableCategories);
150554
+ return HEPHAESTUS_GPT_5_6_TEMPLATE.replace("{{ taskSystemGuide }}", taskSystemGuide).replace("{{ categorySkillsGuide }}", categorySkillsGuide).replace("{{ delegationTable }}", delegationTable).replace("{{ oracleSection }}", oracleSection).replace("{{ frontendGuidance }}", frontendGuidance);
150555
+ }
150556
+
150185
150557
  // packages/omo-opencode/src/agents/hephaestus/agent.ts
150186
150558
  var MODE9 = "primary";
150187
150559
  var GPT_5_3_CODEX_RE = /^gpt-5[.-]3-codex(?:$|[.-])/i;
150188
150560
  var GPT_5_4_RE = /^gpt-5[.-]4(?:$|[.-])/i;
150189
150561
  var GPT_5_5_RE = /^gpt-5[.-]5(?:$|[.-])/i;
150562
+ var GPT_5_6_RE = /^gpt-5[.-]6(?:$|[.-])/i;
150190
150563
 
150191
150564
  class UnsupportedHephaestusModelError extends Error {
150192
150565
  model;
150193
150566
  constructor(model) {
150194
- super(`Hephaestus only supports GPT-5.3 Codex, GPT-5.4, and GPT-5.5 models; received ${model ?? "no model"}.`);
150567
+ super(`Hephaestus only supports GPT-5.3 Codex, GPT-5.4, GPT-5.5, and GPT-5.6 models; received ${model ?? "no model"}.`);
150195
150568
  this.name = "UnsupportedHephaestusModelError";
150196
150569
  this.model = model;
150197
150570
  }
@@ -150203,7 +150576,7 @@ function isHephaestusSupportedModel(model) {
150203
150576
  if (!model)
150204
150577
  return false;
150205
150578
  const modelName = extractModelName3(model);
150206
- return GPT_5_3_CODEX_RE.test(modelName) || GPT_5_4_RE.test(modelName) || GPT_5_5_RE.test(modelName);
150579
+ return GPT_5_3_CODEX_RE.test(modelName) || GPT_5_4_RE.test(modelName) || GPT_5_5_RE.test(modelName) || GPT_5_6_RE.test(modelName);
150207
150580
  }
150208
150581
  function assertHephaestusSupportedModel(model) {
150209
150582
  if (!isHephaestusSupportedModel(model)) {
@@ -150212,6 +150585,9 @@ function assertHephaestusSupportedModel(model) {
150212
150585
  }
150213
150586
  function getHephaestusPromptSource(model) {
150214
150587
  assertHephaestusSupportedModel(model);
150588
+ if (model && isGpt5_6Model(model)) {
150589
+ return "gpt-5-6";
150590
+ }
150215
150591
  if (model && isGpt5_5Model(model)) {
150216
150592
  return "gpt-5-5";
150217
150593
  }
@@ -150230,6 +150606,9 @@ function buildDynamicHephaestusPrompt(ctx) {
150230
150606
  const source = getHephaestusPromptSource(model);
150231
150607
  let basePrompt;
150232
150608
  switch (source) {
150609
+ case "gpt-5-6":
150610
+ basePrompt = buildGpt56HephaestusPrompt(agents, tools, skills, categories, useTaskSystem);
150611
+ break;
150233
150612
  case "gpt-5-5":
150234
150613
  basePrompt = buildGpt55HephaestusPrompt(agents, tools, skills, categories, useTaskSystem);
150235
150614
  break;
@@ -150885,7 +151264,7 @@ No tasks on multi-step work = INCOMPLETE WORK.`;
150885
151264
  No todos on multi-step work = INCOMPLETE WORK.`;
150886
151265
  }
150887
151266
  // packages/omo-opencode/src/agents/sisyphus-junior/gpt-5-5.ts
150888
- function buildTaskSystemGuide3(useTaskSystem) {
151267
+ function buildTaskSystemGuide4(useTaskSystem) {
150889
151268
  if (useTaskSystem) {
150890
151269
  return `Create tasks before any non-trivial work (2+ steps, uncertain scope, multiple items).
150891
151270
 
@@ -151161,7 +151540,7 @@ The block below (injected at runtime by the harness) tells you the specific cate
151161
151540
  `;
151162
151541
  function buildGpt55SisyphusJuniorPrompt(useTaskSystem, promptAppend) {
151163
151542
  const personality = "";
151164
- const taskSystemGuide = buildTaskSystemGuide3(useTaskSystem);
151543
+ const taskSystemGuide = buildTaskSystemGuide4(useTaskSystem);
151165
151544
  const base = SISYPHUS_JUNIOR_GPT_5_5_TEMPLATE.replace("{{ personality }}", personality).replace("{{ taskSystemGuide }}", taskSystemGuide);
151166
151545
  if (!promptAppend)
151167
151546
  return base;
@@ -151549,7 +151928,7 @@ function getSisyphusJuniorPromptSource(model) {
151549
151928
  if (model && isKimiK2Model(model))
151550
151929
  return "kimi-k2";
151551
151930
  if (model && isGptModel(model)) {
151552
- if (isGpt5_5Model(model))
151931
+ if (isGpt5_5Model(model) || isGpt5_6Model(model))
151553
151932
  return "gpt-5-5";
151554
151933
  const lower = model.toLowerCase();
151555
151934
  if (lower.includes("gpt-5.4") || lower.includes("gpt-5-4"))