- Status: Phases 2-6 complete; Phase 7 automated verification complete (live manual verification pending).
- Actions taken:
- Phase 2: Added
Agenttoipc.Request/ipc.SessionInfo/session.Session(empty → claude, normalized on Load),config.codex_bin. Backward-compat tests. - Phase 3: Split
hook.Runinto provider-aware dispatch. Verified the Codex hook contract against local Codex 0.146.0 + CodeIsland source:PermissionRequestoutput identical envelope to Claude's;{}defers; PreToolUse deny-only → not installed for Codex. Newinternal/codexrulespackage:prefix_rulederivation/escaping/dedup, MCPapproval_modein config.toml, auto-review defer. Table-driven tests. - Phase 4: Interactive agent selection in
codelark install(Claude/Codex/both, default = detected set); codex hooks.json installer that merges with other tools (CodeIsland) and never adds unknown fields; uninstall removes only codelark-owned entries; hook-trust note printed. Tests. - Phase 5:
runAgentTmuxgeneric launch,larkcodexsymlink,codelark tmux --agentparsing,resolveCodex/tmux.CodexPathresolution,/newdual-agent buttons. Tests. - Phase 6: Agent labels on all cards (
card.AgentLabel), codex始终允许out-of-band persistence inresolveApprovalActionwith degradation + card reporting. Tests. - Phase 7:
go test ./...9/9 green,go vetclean, hook CLI smoke tests, README/install.sh/usage() updated.
- Phase 2: Added
- Files created/modified: see git diff (task_plan.md, findings.md, progress.md, internal/codexrules/, internal/hook/, internal/daemon/, internal/card/, internal/ipc/, internal/session/, internal/tmux/, internal/prompt/, internal/config/*, main.go, main_test.go, README.md, install.sh).
- Status: complete
- Started: 2026-08-05
- Actions taken:
- Reviewed current Claude hook, daemon, IPC, tmux, config, card, and CLI coupling points.
- Confirmed tmux functions are generic enough for Codex.
- Confirmed local Codex binary and version:
codex-cli 0.146.0. - Confirmed local Codex uses
~/.codex/hooks.jsonand hook trust state in~/.codex/config.toml. - Created handoff plan for another agent.
- Updated the plan per user direction:
codelark installmust prompt interactively for which agents to wire. - Updated the plan per user question: Codex
始终允许must not use hookupdatedPermissions. - Inspected CodeIsland's Codex always-allow implementation and updated plan with a CodeIsland-parity option.
- Updated the plan per user direction: first Codex release must implement CodeIsland-parity
始终允许, not an MVP subset. - Inspected CodeIsland's
ExitPlanModehandling: normal PermissionRequest path, configurable auto-approve, default off. - Re-checked CodeIsland source line references and compared them with codelark's existing
ExitPlanModeproduct-boundary handling. - Updated plan/findings to keep Claude
ExitPlanModeexception unless new manual evidence disproves it, while requiring Codex behavior verification. - Re-verified the ExitPlanMode remote-approval boundary with a terminal-confirmed test; cross-tested a third-party tool, CodeIsland, approving the same prompt remotely, which also failed to unblock Claude Code. Logged as corroboration, not independently documented.
- Files created/modified:
task_plan.mdcreated.findings.mdcreated.progress.mdcreated.task_plan.mdupdated with interactive install UX requirements.findings.mdupdated with install UX decision and risk.progress.mdupdated with this note.task_plan.mdupdated with provider-specific始终允许handling.findings.mdupdated with CodexPermissionRequestconstraints.task_plan.mdupdated to describe CodeIsland-style Codex rule persistence.findings.mdupdated with CodeIsland source references and implementation details.task_plan.mdupdated to make Codex始终允许mandatory and set$CODEX_HOME/rules/codelark.rules.findings.mdupdated to remove the conservative-MVP option for Codex始终允许.findings.mdupdated with CodeIslandExitPlanModehandling.findings.mdupdated with line-level CodeIsland and codelarkExitPlanModereferences.task_plan.mdupdated with explicitExitPlanModeimplementation guidance.docs/backlog.mdupdated with cross-tool corroboration (CodeIsland remote approval also fails to unblock Claude Code onExitPlanMode).
| Test | Input | Expected | Actual | Status |
|---|---|---|---|---|
go test ./... |
Full suite | All pass | 9/9 packages pass | PASS |
go vet ./... |
Full build | Clean | Clean | PASS |
| Hook CLI smoke (built binary) | Claude/Codex PermissionRequest, Codex PreToolUse, SessionStart, Stop, no daemon | Defer {} (PreToolUse: empty stdout) |
Matched | PASS |
| Codex always-allow persistence | daemon test, temp $CODEX_HOME |
Writes rules/codelark.rules / config.toml, plain allow, card outcome |
PASS | |
| hooks.json merge/dedup | install/uninstall with CodeIsland-style entries | Other tools' hooks preserved, codelark idempotent | PASS | |
--agent parsing |
codelark tmux --agent codex -r x |
Strips flag, forwards rest | PASS |
| Timestamp | Error | Attempt | Resolution |
|---|---|---|---|
| 2026-08-05 | None during planning | 1 | Planning completed without implementation errors. |
| 2026-08-05 | tomlKeySegment cutset bug (all TOML segments quoted) |
1 | Explicit safe-char loop + tests |
| 2026-08-05 | Codex shape test asserted forbidden fields present | 1 | Rewrote to lock omitempty contract |
| 2026-08-05 | Card tests asserted pre-Codex copy/buttons | 2 | Updated assertions |
| Question | Answer |
|---|---|
| Where am I? | Phases 2-6 complete; Phase 7 automated verification done; live manual verification pending. |
| Where am I going? | User manually verifies: larkcodex, codelark tmux --agent codex, Codex /workspace + approval + 始终允许, hook trust. |
| What's the goal? | Add Codex as a first-class codelark agent type while preserving Claude behavior. |
| What have I learned? | See findings.md + task_plan.md checkboxes. |
| What have I done? | Implemented all phases: agent model, hook provider split, codexrules, install/uninstall, tmux shortcuts, cards, verification. |